public static bool UpdateCustomer(CUSTOMER customer) { try { ctx.Entry(customer).State = System.Data.EntityState.Modified; ctx.SaveChanges(); } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e); return false; } return true; }
public static NOTE_SHARABLE[] GetNoteSharableByCustomer(CUSTOMER customer) { NOTE_SHARABLE[] notes = null; using (CloudEDUEntities ctx = new CloudEDUEntities()) { notes = ctx.NOTE_SHARABLE.Where(n => n.CUSTOMER_ID == customer.ID).ToArray(); } return notes; }
public static COMMENT[] GetCommentsByCustomer(CUSTOMER customer) { COMMENT[] comments = null; using (CloudEDUEntities ctx = new CloudEDUEntities()) { comments = ctx.COMMENTs.Where(c => c.CUSTOMER_ID == customer.ID).ToArray(); } return comments; }