public bool Update(Loai_SachModel model) { string msgError = ""; try { var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "Loai_Sach_update", "@ID_LoaiSach", model.ID_LoaiSach, "@Ten_Loai", model.Ten_Loai); if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError)) { throw new Exception(Convert.ToString(result) + msgError); } return(true); } catch (Exception ex) { throw ex; } }
public Loai_SachModel UpdateUser([FromBody] Loai_SachModel model) { _Loai_SachBLL.Update(model); return(model); }
public bool Update(Loai_SachModel model) { return(_res.Update(model)); }
public Loai_SachModel CreateItem([FromBody] Loai_SachModel model) { model.ID_LoaiSach = Guid.NewGuid().ToString(); _Loai_SachBLL.Create(model); return(model); }
public bool Create(Loai_SachModel model) { return(_res.Create(model)); }