This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--modified from SO: http://stackoverflow.com/questions/5873170/generate-class-from-database-table | |
--added table and column | |
declare @TableName sysname = 'TableName' | |
declare @Result varchar(max) = '[Table(Name = "' + @TableName + '")] | |
public class ' + @TableName + ' | |
{' | |
select @Result = @Result + ' | |
[Column(DbType = "' + |