I'm trying to get a proof-of-concept application which uses Entity Framework 6 with Mono 3.0.6 - and after 2 days of trials I'm giving up. Is there any sample app around I can look at? I googled - no luck.
I was trying to use "EntityFramework.dll" library from mono/GAC - in this case the project even does not get to the main() function - I get IL exception before that.
I tried downloading EF6 alpha 3 from NuGet - but then project crashes during the execution:
System.NullReferenceException: Object reference not set to an instance of an object at System.Data.Entity.Core.SchemaObjectModel.EntityKeyElement.Validate () [0x00000] in <filename unknown>:0
at System.Data.Entity.DropCreateDatabaseIfModelChanges`1[MonoTest.EF.FooContext].InitializeDatabase (MonoTest.EF.FooContext context) [0x00000] in <filename unknown>:0
at System.Data.Entity.Internal.InternalContext+<>c__DisplayClassc`1[MonoTest.EF.FooContext].<CreateInitializationAction>b__b () [0x00000] in <filename unknown>:0
at System.Data.Entity.Internal.InternalContext.PerformInitializationAction (System.Action action) [0x00000] in <filename unknown>:0
at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization () [0x00000] in <filename unknown>:0
at System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4 (System.Data.Entity.Internal.InternalContext c) [0x00000] in <filename unknown>:0
at System.Data.Entity.Internal.RetryAction`1[System.Data.Entity.Internal.InternalContext].PerformAction (System.Data.Entity.Internal.InternalContext input) [0x00000] in <filename unknown>:0
So I'm not sure what's going on. Mono team said EF is shipped as part of Mono half a year ago - has anyone used it yet?
I would appreciate any links or source codes or tips to get this thing going.
Thanks!
I believe this is a bug in EF. I tried EF6 + Mono this and hit a NullReferenceException in the very same method. I filed a bug for this. You may want to create a bootleg and fix the bug on your own until it is fixed in the product - I described how to do that in the post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With