예제 #1
0
        public IHttpActionResult Delete(int id)
        {
            if (!_companyServices.IsOwner(id, UserId))
            {
                return(Content(HttpStatusCode.Forbidden, "This is not your company"));
            }

            _companyServices.Delete(id);

            return(Ok(new
            {
                data = "OK"
            }));
        }
예제 #2
0
        public async Task <IActionResult> Delete([FromRoute] Guid id)
        {
            await _companyServices.Delete(id);

            return(NoContent());
        }
예제 #3
0
 public IActionResult Delete(int id)
 {
     ICompanyServices.Delete(id);
     return(RedirectToAction("Index"));
 }