New Post: Table Per Type inheritance makes one entity in designer - VS2013 EF6
Hi, I am moving my project from VS2010 EF4 to VS2013 EF6. And some strange things happens - when I created model from existing database it doesn't show the devired classes in designer and doesn't...
View ArticleNew Post: Table Per Type inheritance makes one entity in designer - VS2013 EF6
@maziarkaradoslaw - When reverse engineering database EF Designer builds the simplest possible model where each table is mapped to a single entity with the exception of the join table of a many-to-many...
View ArticleNew Post: error generating views
Same issue with EF 6 on Visual Studio 2010: System.NullReferenceException: Object reference not set to an instance of an object. at...
View ArticleNew Post: CompatibleWithModel was working with EF5 not anymore with EF6
Hi Arthur, Thanks for your answer, but even if I add the ContextKey and run the test, it still throws the same exception with the same message... The contextkey column in __MigrationHistory is filled...
View ArticleNew Post: CompatibleWithModel was working with EF5 not anymore with EF6
@swell When I tested this with the code below it worked fine for me. Can you have a look and see what I might be missing from the repro? Thanks, Arthurpublic class Blog { public int Id { get; set; }...
View ArticleNew Post: Detect if EF6 designer is installed in VS 2012
I have a tool (the SQL Server Compact Toolbox Visual Studio add-in) that takes advantage of the presence of the EF6 Designer on the machine. How can I reliably detect using .NET/VS APIs, if the EF6...
View ArticleNew Post: Detect if EF6 designer is installed in VS 2012
One way of doing this would to be to check the assembly version of the package. You can do this by calling vsShell.IsPackageLoaded(ref packageGuid, out package) (see PackageManager.LoadEDMPackage()...
View ArticleNew Post: I'am using EF6 code first model, Not getting any proper solution to...
I'am using EF6 code first model, Not getting any proper solution to map an existing Stored Procedure. Can anyone give me the best solution for this, i need call the Repository from my Service. Am using...
View ArticleNew Post: Detect if EF6 designer is installed in VS 2012
@Pawel, Thanks, for my purpose, I think I will stick to: File.Exists(Path.Combine(dteH.GetVisualStudioInstallationDir(), "ItemTemplates\CSharp\Data\1033\DbCtxCSEF6\CSharpDbContext.Context.tt"));
View ArticleNew Post: T4 template - navigation properties
Hi. I would like to know if there is a way in EF5 to get the related property of an M:N Navigation Property within the t4 template? For example:var navigationProperties =...
View ArticleNew Post: Entity cannot deleted from child collection but can be from context
Given the following structure: Project 1:n Children 1:n SubChildren with the mappings below:this.HasMany(p => p.Children) .WithRequired(c=> c.Project) .WillCascadeOnDelete(true); A...
View ArticleNew Post: Mocking DbSet throws ArgumentNullException for 'source' argument...
I'm having the exact same problem three months later :) Any clues on how you got around this issue? Anyone know if this is being addressed for the next release of EF?
View ArticleNew Post: Testing with async queries doesn't work
Hi Rowan, I've been using your articles as a guide, and I ran across this issue. Mocking DbSet throws ArgumentNullException for 'source' argument when used with Include....
View ArticleNew Post: I'am using EF6 code first model, Not getting any proper solution to...
I second that. I have a pretty big Model FIrst database with all the limitations of ridiculous design decisions and a designer being an example of how to totally kill usability (in the update method)....
View ArticleNew Post: is there a plan to do migration in Model first or Database first...
I am close to "-1" on that. Seriously. There are those of us for whom any form of migration etc. is not wanted. Not "not needed" but seirously counterproductive. In fact, the way EF implements any form...
View ArticleNew Post: Getting Model metadata from ExpressionConverter ?
I'm playing around with a few of the UpForGrabs issues. Is there any way to get access to the model metadata from an ExpressionConverter? I need to check if a type is an entity type, and what property...
View ArticleNew Post: Getting Model metadata from ExpressionConverter ?
Hi Roger, I would start with TypeSemantics.IsEntityType(), then cast the type to System.Data.Entity.Core.Metadata.Edm.EntityType and look for its KeyProperties or KeyMembers. HTH, Diego
View ArticleNew Post: Getting Model metadata from ExpressionConverter ?
Before that, you might need to call ExpressionTranslator.TryGetValueLayerType to get the EdmType corresponding to the type in the LINQ expression, but depending on where you are, you might already have...
View ArticleNew Post: CompatibleWithModel was working with EF5 not anymore with EF6
Hi Arthur, I made it working, the problem came from this lineContextKey = typeof(BlogContext).ToString() I changed it toContextKey = "MyContext.Data.Ef.Migrations.Configuration" The test is now working...
View Article