Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Making EF Core properties backward compatible with Linq-To-Sql

$
0
0

ASP. NET MVC 4.8 application uses DbLinq. 

Database has tables where column and table names are same:


CREATE TABLE Product ( Product CHAR(20) PRIMARY KEY ); Sql to Linq created entites with Contents property from them: public class Product ( public string Contents { get; set; } } Contents propery becomes part of published API used by third-party applications. EF Core scaffold creates property Product1 instead: public class Product ( public string Product1 { get; set; } }

This breaks API specification. How to make EF Core with API compatible ?

Is it possible to force it to generate Contents property as Sql to Linq ?

Or is it possible to add additional Contents property which actually gets and sets Product1 property values ?

Npgsql EF Core provider is used in ASP.NET Core MVC application.


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>