public void PostSanPham([FromBody] NhaSanXuat_OBJ obj) { if (!ModelState.IsValid) { return; } NhaSanXuat_BUS bus = new NhaSanXuat_BUS(); bus.ThemMoi(obj); }
public IHttpActionResult PutSanPham([FromBody] NhaSanXuat_OBJ obj) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } NhaSanXuat_BUS bus = new NhaSanXuat_BUS(); bus.CapNhap(obj); return(StatusCode(HttpStatusCode.NoContent)); }