public IHttpActionResult Post(CustomersBranches entity) { try { db.CustomersBranches.Add(entity); db.SaveChanges(); return(Ok(entity)); } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult Put(CustomersBranches entity) { try { db.CustomersBranches.Attach(entity); db.Entry(entity).State = EntityState.Modified; db.SaveChanges(); return(Ok(entity)); } catch (Exception ex) { return(InternalServerError(ex)); } }