示例#1
0
        public void Delete()
        {
            request.CategoryID = 2;
            var isValid = facade.Delete(request);

            Assert.Equal(true, isValid.Result.IsSuccess);
        }
 public async Task <IActionResult> Delete(CategoryRequest request)
 {
     try
     {
         authHelper.IsLogin(ref CurrentLogin, ref response, HttpContext.User.Identity as ClaimsIdentity);
         if (response.IsSuccess)
         {
             request.CurrentLogin = CurrentLogin;
             return(Ok(await facade.Delete(request)));
         }
         return(Ok(response));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex));
     }
 }
示例#3
0
 public IActionResult Delete(Guid id)
 {
     categoryFacade.Delete(id);
     return(Ok());
 }