Tool for generating POCO/DTO from database (SQL Server)

What free tools can generate simple POCO/DTO classes from MS SQL Server database? With Properties and fields, but nothing more.

  • Select latest records by datetime field
  • Converting a Time to 24 hour time in SQL Server
  • Why does SQL_Latin1_General_CP1_CI_AS sort number-sign before underscore?
  • Select values from one table based on specific value of another table Linq
  • How to build a DB based ruleset for web app achievement system?
  • SQL Search column for each variable in CSV string
  • Get Entity Framework 6 use NOLOCK in its underneath SELECT statements
  • How to correctly and efficiently reuse a prepared statement in C# .NET (SQL Server)?
  • SSIS - The process cannot access the file because it is being used by another process
  • Programmatically detach SQL Server database to copy mdf file
  • TSQL - Parse Execution Plan to determine columns to be returned by a stored procedure
  • Know when to retry or fail when calling SQL Server from C#?
  • 2 Solutions collect form web for “Tool for generating POCO/DTO from database (SQL Server)”

    Have a look at MyGeneration – it’s a free code generation tool for SQL Server that lets you define templates that will be driven by the database structure.

    You decide what will come out on the other side.

    Found nothing suitable so created a very simple TSQL script. Here is the gist.

    Sample output:

    public class EmployeeDto
            public int Id { get; set; }
            public int AccountId { get; set; }
            public string ExternalId { get; set; }
            public string EmailAddress { get; set; }
            public bool IsActive { get; set; }
            public string UniqueId { get; set; }
            public bool IsBuiltIn { get; set; }
            public string LastName { get; set; }
            public string FirstName { get; set; }
            public string MiddleName { get; set; }
            public bool IsAuthorizedOnAllDepartments { get; set; }
    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.