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.
Member
52 Points
616 Posts
Making EF Core properties backward compatible with Linq-To-Sql
Feb 07, 2021 02:27 PM|kobruleht|LINK
ASP. NET MVC 4.8 application uses DbLinq.
Database has tables where column and table names are same:
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.