Ejemplo n.º 1
0
        public IActionResult Delete(string id)
        {
            // Kết quả trả về
            var result = _baseBL.Delete(id);

            // Kiểm tra trạng thái trả về
            if (result.Success == false)
            {
                return(StatusCode(404, result.Data));
            }
            return(StatusCode(204, result.Data));
        }
        public IActionResult Delete(Guid id)
        {
            var rowAffects = _baseBL.Delete(id);

            if (rowAffects > 0)
            {
                return(StatusCode(200, "Xóa thành công"));
            }
            else
            {
                return(NoContent());
            }
        }
Ejemplo n.º 3
0
        public async Task <ServiceResponse> Delete(string id)
        {
            try
            {
                ServiceResponse res = new ServiceResponse();
                res.Data = await _baseBL.Delete(id, curentType);

                return(res);
            }
            catch (Exception e)
            {
                return(_baseBL.Error(e));
            }
        }
Ejemplo n.º 4
0
        public virtual IActionResult Delete(Guid id)
        {
            var result = _baseBL.Delete(id);

            return(StatusCode((int)result.HTTPStatusCode, result.Data));
        }
Ejemplo n.º 5
0
 public virtual int Delete(Guid id)
 {
     return(baseBL.Delete(new object[] { id }));
 }