public void Edit(rr_history entry) { var entryToUpd = dbContext.rr_history.First(e => e.id == entry.id); entryToUpd = entry; dbContext.SaveChanges(); }
/// <summary> /// Create a new rr_history object. /// </summary> /// <param name="id">Initial value of the id property.</param> /// <param name="last_name">Initial value of the last_name property.</param> /// <param name="date">Initial value of the date property.</param> /// <param name="type">Initial value of the type property.</param> /// <param name="info">Initial value of the info property.</param> /// <param name="card_number">Initial value of the card_number property.</param> public static rr_history Createrr_history(global::System.Int64 id, global::System.String last_name, global::System.DateTime date, global::System.Int64 type, global::System.String info, global::System.String card_number) { rr_history rr_history = new rr_history(); rr_history.id = id; rr_history.last_name = last_name; rr_history.date = date; rr_history.type = type; rr_history.info = info; rr_history.card_number = card_number; return(rr_history); }
public static rr_history Create <T>(String firstName, String secondName, String lastName, DateTime date, RowType type, T info, DateTime birthday, String cardNumber, byte[] photo) { JavaScriptSerializer serializer = new JavaScriptSerializer(); String serInfo = serializer.Serialize(info); rr_history row = new rr_history { first_name = firstName, second_name = secondName, last_name = lastName, date = date, type = (Int64)type, info = serInfo, birthday = birthday, card_number = cardNumber, photo = photo }; return(row); }
/// <summary> /// Deprecated Method for adding a new object to the rr_history EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTorr_history(rr_history rr_history) { base.AddObject("rr_history", rr_history); }
public void Delete(rr_history entry) { dbContext.rr_history.DeleteObject(entry); dbContext.SaveChanges(); }
public void Add(rr_history entry) { dbContext.rr_history.AddObject(entry); dbContext.SaveChanges(); }