New Post: Does Code First from Database wizard replace Entity Framework Power...
@mkchandler Maybe you should have a look at the EF Reverse POCO template?
View ArticleNew Post: Does Code First from Database wizard replace Entity Framework Power...
@ErikEJ I've looked at the templates (as I stated above). They are not intuitive and I see nothing that will allow me to magically start creating "mapping" files for the fluent api. That is my question.
View ArticleNew Post: Does Code First from Database wizard replace Entity Framework Power...
I see no reference to the EF Reverse POCO template above!? And they generate fluent api mappings... http://erikej.blogspot.dk/2014/03/entity-framework-6-sql-server-compact.html
View ArticleNew Post: Does Code First from Database wizard replace Entity Framework Power...
@ErikEJ I will take a look at this other extension you mention, but I'm still wondering if there will be support in Microsoft's official tools to do this (easily). Thanks for the link.
View ArticleNew Post: Does Code First from Database wizard replace Entity Framework Power...
@mkchandler you are welcome, just trying to pave a path for you
View ArticleNew Post: Mixing TPC and TPH in one Class Hierarchy
Hi All, I'm struggeling with the mapping of a complex class hierarchy. Let asume I've got the following classes:abstract class Entity class concreteA : Entity abstract class EntityB : Entity class...
View ArticleNew Post: "Code First from Database" not picking up optional relationships
I'm using EF 6.1.1 and the latest Data Tools for VS 2013. Some of my entities are defined with optional relationships. Using the (now obsolete) Reverse Engineering power tool it would generate the...
View ArticleNew Post: "Code First from Database" not picking up optional relationships
Hey Chris, Any chance you could post some SQL to create the two tables that are generating this invalid relationship? Looks like it's not setting up the foreign key property correctly. ~Rowan
View ArticleNew Post: Mixing TPC and TPH in one Class Hierarchy
Hey Christian, Here is some sample code that achieves what you are after. BTW MapInheritedProperties is what identifies that it should be TPC rather than TPT (i.e. any inherited properties are mapped...
View ArticleNew Post: "Code First from Database" not picking up optional relationships
Sure. I generated the script from Sql Server Mgmt Studio, so it should compile..O /****** Object: Table [PersonLanguage] Script Date: 08/04/2014 19:29:47 ******/ SET ANSI_NULLS ON GO SET...
View ArticleNew Post: Mixing TPC and TPH in one Class Hierarchy
Hi Rowan, many thanks for your help. Your snippet worked! Christian
View ArticleNew Post: "Code First from Database" not picking up optional relationships
Hey Chris, I'm not able to reproduce this issue. When I run the Code First from Database wizard it correctly configures the relationship. Here are the steps I used and perhaps you can let me know how...
View ArticleNew Post: "Code First from Database" not picking up optional relationships
Rowan, The penny just dropped for me. I didn't realize there was fluentAPI code in the generated context. I never thought to to look there. I assumed because it used data annotations, it used them...
View ArticleNew Post: "Code First from Database" not picking up optional relationships
Hey Chris, No worries, glad to help. ~Rowan
View ArticleNew Post: Fix database first usage or release a new EDMGEN
Hi, I have been battling the same issue for last few days. I used EDMGEN2 to create EDMX. And we only use Store Procs in our EDMx. SSDL looks perfectly fine but CSDL is missing function import entries...
View ArticleNew Post: Incremental value update
Hello, My task requires to incrementally update value in the database. Using plain SQL I will do something like this:update Table set Amount=Amount+:Delta where ID=123 It is possible to do this using...
View ArticleNew Post: ef 6.1.1 problem while using WithRequiredPrincipal
Hi Rayzen, Thanks! Yes, this was a regression in SQL generation in 6.1.1. It is now fixed in our nightly builds and the fix will be included in 6.1.2 (I used the code you provided to repro and...
View ArticleNew Post: Incremental value update
Hi Pavel, Currently EF can only generate and submit INSERT, UPDATE and DELETE operations based on changes tracked on objects loaded into memory. You are basically describing the feature request tracked...
View ArticleNew Post: Incremental value update
Hi Diego, I'm exactly doing it bypassing the EF via ExecuteSqlCommand, but I have (don't ask my why) to work with MySQL and I have a lot of problems with transaction management using this approach....
View ArticleNew Post: Incremental value update
Hello Pavel, I am not an expert on MySQL's transaction support but you may want to try the overload of ExecuteSqlCommand that takes a TransactionalBehavior argument to turn off wrapping the operation...
View Article