sql to model c 23

Solutions on MaxInterview for sql to model c 23 by the best coders in the world

showing results for - "sql to model c 23"
Philomène
24 Jan 2017
1Generate C# class from SQL Server table without Store Procedure
2
3Is there any way to generate a class for table in SQL Server without adding table in project with ADO.net Entity Framework?
4
5enter image description here
6
7public class Approval
8{
9        public long Id { get; set; }
10        public long? FormId { get; set; }
11        public long? DesignationId { get; set; }
12        public DateTime? CreatedOn { get; set; }
13}
14Sep 2018 - Waqas Nawaz Warraich
15This online tool generates a class from SQL table. Class is based on the CREATE TABLE script in MS-SQL, ORACLE, MYSQL, POSTGRESQL and SQLite databases, to a class in C# and other programming languages.
16
17https://codverter.com/src/sqltoclass
18
19enter image description here
20
21Jul 2019 - jonathana
22If you want to use Entity Framework you should consider to use Database First approach.
23
24Other simple and fast way to import a Sql Server scheme to a class in VS is this:
25
26Make a select as json query:
27
28SELECT * FROM Approval 
29FOR JSON AUTO
30Copy one row from the result in your clipboard:
31
32[
33  {"Id":1, "FormId":10, "DesignationId":100, "CreatedOn":"2000-01-01T00:00:00"},
34  {"Id":2, "FormId":20, "DesignationId":200, "CreatedOn":"2000-01-01T00:00:00"}
35]
36Paste in Visual Studio: Edit > Paste Special > Paste JSON As Classes