sgmoore

About

Username
sgmoore
Joined
Visits
1,274
Last Active
Roles
Member
Points
74
Badges
9
  • Re: simple way(s) to get schema info in LINQPad script?

    The MetaModel Mapping should give you the information.
    For example, the following should dump out some info on all the columns on all the tables.

    foreach(var table in Mapping.GetTables())
    {
    (
    from dm in table.RowType.DataMembers
    where dm.DbType != null
    select new { dm.Name , dm.DbType , dm.Type , dm.MappedName, dm.IsPrimaryKey }
    )
    .Dump(table.TableName);
    }

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Badges