/// <summary>
 /// Creates profiles for Starcounter tables
 /// </summary>
 public static ResourceProfile Profile(IEntityResource <T> resource) => ResourceProfile.Make(resource, rows =>
 {
     var resourceSQLName = typeof(T).RESTarTypeName();
     var scColumns       = Db.SQL <Column>(ColumnByTable, resourceSQLName).Select(c => c.Name).ToList();
     var columns         = resource.Members.Values.Where(p => scColumns.Contains(p.Name)).ToList();
     return(rows.Sum(e => columns.Sum(p => p.ByteCount(e)) + 16));
 });
 /// <summary>
 /// Creates profiles for DDictionary tables
 /// </summary>
 public static ResourceProfile Profile(IEntityResource <T> resource)
 {
     return(ResourceProfile.Make(resource, rows => rows.Sum(row => row.KeyValuePairs.Sum(kvp => kvp.ByteCount) + 16)));
 }