public static Commentresults BuildCommentresultsFromRow(DataRow row) { Commentresults entity = new Commentresults(); entity.type = row.IsNull("type") ? string.Empty : row.Field <string>("type"); entity.commentText = row.IsNull("comment_text") ? string.Empty : row.Field <string>("comment_text"); 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 UpdateRowFromCommentresults(ref DataRow row, Commentresults entity) { row.SetField("type", entity.type); row.SetField("comment_text", entity.commentText); row.SetField("userfield", entity.userfield); }