public static Dbconnectsum BuildDbconnectsumFromRow(DataRow row) { Dbconnectsum entity = new Dbconnectsum(); entity.iTwlSessionCnt = row.IsNull("iTwlSessionCnt") ? 0 : row.Field <int>("iTwlSessionCnt"); entity.dbconnectsumuserfield = row.IsNull("dbconnectsumuserfield") ? string.Empty : row.Field <string>("dbconnectsumuserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromDbconnectsum(ref DataRow row, Dbconnectsum entity) { row.SetField("iTwlSessionCnt", entity.iTwlSessionCnt); row.SetField("dbconnectsumuserfield", entity.dbconnectsumuserfield); row.SetField("userfield", entity.userfield); }