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.

  • SQL Inner Join without repeat
  • Same query with the same query plan takes ~10x longer when executed from ADO.NET vs. SMSS
  • sync two local and remote sql server database
  • How to insert into a table from temp table?
  • SQL Server : how to find startup parameters for t272
  • How can I get SQL Server column definition with parentheses and everything?
  • Sysprocesses table - will it help me debug connection pooling issues?
  • Search full name with single input box
  • Force Entity Framework to use SQL parameterization for better SQL proc cache reuse
  • Syncing SQL server data across different SQL server instances
  • Datatype for System.Version in sql server
  • Connection String Dynamic 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.