public static Sasttsastae BuildSasttsastaeFromRow(DataRow row) { Sasttsastae entity = new Sasttsastae(); entity.codedata = row.IsNull("codedata") ? string.Empty : row.Field <string>("codedata"); entity.codedata2 = row.IsNull("codedata2") ? string.Empty : row.Field <string>("codedata2"); 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 UpdateRowFromSasttsastae(ref DataRow row, Sasttsastae entity) { row.SetField("codedata", entity.codedata); row.SetField("codedata2", entity.codedata2); row.SetField("userfield", entity.userfield); }