Entity Framework 6 - first steps to a full xBase solution
- Phil Hepburn
- Posts: 743
- Joined: Sun Sep 11, 2016 2:16 pm
Entity Framework 6 - first steps to a full xBase solution
Hi Robert, Team, and guys,
Well, I now have my head back into 'Entity Framework 6' (as version 7 seems a long way off, and will most likely be 'Entity Core' instead, according to wen articles etc..
Still 'EF6' is working well in C#, and is set to be around for quite some time according to reliable sources.
So I am first trying to convert my old Vulcan / C# 'hybrid' Cologne apps into fully coded X# ones. In the past I used a 'thin' DAL (data access layer) where the LINQ stuff was done in C# and the other stuff in Vulcan. Nice WPF data bound example.
I have some of code compiling with the X# compiler, but now I am having some problems with the 'Configuration' classes, when I try and code them in X# from CSharp. And Fabrice's Reflector plug-in gives me an amazing complex and large translation ;-0( It may be correct BUT will put guys off EF for life I would guess ;-0)
Can you just look at the first three attached small images to see if you can see what I can do (easily) to put things right ?
Here is the CSharp code :-
And now you can see what I was trying :-
Here below (included) is an image of my best try as well as the errors :-
And for any who wish to see the Reflector details ;-0))) see below (if you can read the detail !?
HELP most welcomed.
Regards,
Phil.
Well, I now have my head back into 'Entity Framework 6' (as version 7 seems a long way off, and will most likely be 'Entity Core' instead, according to wen articles etc..
Still 'EF6' is working well in C#, and is set to be around for quite some time according to reliable sources.
So I am first trying to convert my old Vulcan / C# 'hybrid' Cologne apps into fully coded X# ones. In the past I used a 'thin' DAL (data access layer) where the LINQ stuff was done in C# and the other stuff in Vulcan. Nice WPF data bound example.
I have some of code compiling with the X# compiler, but now I am having some problems with the 'Configuration' classes, when I try and code them in X# from CSharp. And Fabrice's Reflector plug-in gives me an amazing complex and large translation ;-0( It may be correct BUT will put guys off EF for life I would guess ;-0)
Can you just look at the first three attached small images to see if you can see what I can do (easily) to put things right ?
Here is the CSharp code :-
And now you can see what I was trying :-
Here below (included) is an image of my best try as well as the errors :-
And for any who wish to see the Reflector details ;-0))) see below (if you can read the detail !?
HELP most welcomed.
Regards,
Phil.
Entity Framework 6 - first steps to a full xBase solution
Hi Phil,
maybe a first help: "func" is a reserved word in X#.
The following code fails to compile:
where as
compiles.
Maybe you could try to write <func> as <@@func>
Wolfgang
P.S. this code compiles on my machine:
maybe a first help: "func" is a reserved word in X#.
The following code fails to compile:
Code: Select all
class Func
end class
Code: Select all
class @@Func
end class
Maybe you could try to write <func> as <@@func>
Wolfgang
P.S. this code compiles on my machine:
Code: Select all
using System.Collections.Generic
class @@func
end class
class TestFunc
protect oFuncs as List<@@Func>
end class
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
- Phil Hepburn
- Posts: 743
- Joined: Sun Sep 11, 2016 2:16 pm
Entity Framework 6 - first steps to a full xBase solution
Thanks Wolfgang,
Great!
That has gotten me further it would seem - so now I have the following single issue being reported.
Any ideas - you or anyone else ?
Thanks in advance ;-0)
Phil.
Great!
That has gotten me further it would seem - so now I have the following single issue being reported.
Any ideas - you or anyone else ?
Thanks in advance ;-0)
Phil.
- Phil Hepburn
- Posts: 743
- Joined: Sun Sep 11, 2016 2:16 pm
Entity Framework 6 - first steps to a full xBase solution
Sorry,
Wrong image - must be watching the football has made my concentration go ;-0)
Try two
Wrong image - must be watching the football has made my concentration go ;-0)
Try two
- Phil Hepburn
- Posts: 743
- Joined: Sun Sep 11, 2016 2:16 pm
Entity Framework 6 - first steps to a full xBase solution
Try three ?
This should be a single error line reported .............>>
Cheers,
Phil.
This should be a single error line reported .............>>
Cheers,
Phil.
Entity Framework 6 - first steps to a full xBase solution
Hi Phil,
this try was the right one <g>. But I have let this to someone other, maybe Chris or Robert.
Wolfgang
P.S. have to go back to VO programming now
this try was the right one <g>. But I have let this to someone other, maybe Chris or Robert.
Wolfgang
P.S. have to go back to VO programming now
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Entity Framework 6 - first steps to a full xBase solution
Phil
Can you create a small (10 line) sample without external depedencies that reproduces this ?
Robert
Can you create a small (10 line) sample without external depedencies that reproduces this ?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
- Phil Hepburn
- Posts: 743
- Joined: Sun Sep 11, 2016 2:16 pm
Entity Framework 6 - first steps to a full xBase solution
Hi Robert,
Yes, I think I can do that tomorrow - too late tonight, and I have spent enough brain power on EF6 for today ;-0)
Although I can make a small example - without outside dependencies - just 10 lines may be pushing things a bit.
Fingers crossed I can send you something useful. I have got quite a way with this in order to get EF6 working, this just feels like the last step (or two) - then we will 'have it'.
Do you wish me to send the code etc., to your private mail box ? It would seem like the best thing to do. I can then post stuff when we get a working syntax, and the code nice and tidy.
All the best,
Phil.
Yes, I think I can do that tomorrow - too late tonight, and I have spent enough brain power on EF6 for today ;-0)
Although I can make a small example - without outside dependencies - just 10 lines may be pushing things a bit.
Fingers crossed I can send you something useful. I have got quite a way with this in order to get EF6 working, this just feels like the last step (or two) - then we will 'have it'.
Do you wish me to send the code etc., to your private mail box ? It would seem like the best thing to do. I can then post stuff when we get a working syntax, and the code nice and tidy.
All the best,
Phil.
Entity Framework 6 - first steps to a full xBase solution
Phil,
If I look at your example (on a larger screen then yesterday) I see:
System:Linq:Expressions:Expression:Lambda<.....>
Shouldn't that be:
System.Linq.Expressions.Expression.Lambda<.....>
Not sure if this solves your problem, but I think these are all namespace delimiters and should be dots in stead of colons.
Robert
If I look at your example (on a larger screen then yesterday) I see:
System:Linq:Expressions:Expression:Lambda<.....>
Shouldn't that be:
System.Linq.Expressions.Expression.Lambda<.....>
Not sure if this solves your problem, but I think these are all namespace delimiters and should be dots in stead of colons.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
-
- Posts: 248
- Joined: Fri Oct 14, 2016 7:09 am
Entity Framework 6 - first steps to a full xBase solution
Hi Phil,
I may be missing something, but I don't understand your original C#. Why not just use something like
That ought to translate to X#.
Or just use Nullable<>.
Nick
I may be missing something, but I don't understand your original C#. Why not just use something like
Code: Select all
HasOptional(e => e.Attendee).WithMany().HasForeignKey(x => x.AttendeeID)
Or just use Nullable<>.
Nick