How can I get column sizes of a table using Entity Framework?
Let's say we have modeled SomeTable
in our app like so:
public class SomeTable
{
[Key]
public long TicketID { get; set; }
public string SourceData { get; set; }
}
And it's inside our SomeDbContext
like so:
public class SomeDbContext : DbContext
{
public DbSet<SomeTable> SomeTables { get; set; }
}
This table in Db has SourceData
column as varchar(16)
like so:
How can I get the size of this column, which is 16 in this case using C#?