/// <summary> /// Inserts a new row in the MdmDQQue table. /// </summary> /// <param name="mdmque">A MdmDQQue object.</param> /// <returns>An updated MdmDQQue object.</returns> public CustSegment InsertCustSegment(CustSegment mdmdque) { using (var db = new AppDbContext()) { db.Set <CustSegment>().Add(mdmdque); db.SaveChanges(); return(mdmdque); } }
/// <summary> /// Updates the queitem /// </summary> /// <param name="queitem">queitem</param> public virtual void UpdateCustSegment(CustSegment queitem) { if (queitem == null) { throw new ArgumentNullException("queitem"); } _csDAC.UpdateCustSegment(queitem); //event notification //_eventPublisher.EntityUpdated(vendor); }
/// <summary> /// Delete an item /// </summary> /// <param name="queitem">QueItem</param> public virtual void DeleteQueItem(CustSegment queitem) { if (queitem == null) { throw new ArgumentNullException("queitem"); } UpdateCustSegments(queitem); //event notification //_eventPublisher.EntityDeleted(vendor); }
/// <summary> /// Updates an existing row in the mdmdque table. /// </summary> /// <param name="mdmdque">A mdmdque entity object.</param> public void UpdateCustSegment(CustSegment mdmdque) { using (var db = new AppDbContext()) { var entry = db.Entry <CustSegment>(mdmdque); // Re-attach the entity. entry.State = EntityState.Modified; db.SaveChanges(); } }