public async Task <IActionResult> DeleteProvider(long id) { string userId = HttpContext.User.Claims.FirstOrDefault(c => c.Type == "user_id").Value; string fullname = HttpContext.User.Claims.FirstOrDefault(c => c.Type == "fullname").Value; return(Ok(await _iProviderRepository.DeleteProvider(Convert.ToInt64(userId), id, fullname))); }
public ActionResult Delete(int id) { if (!ProviderRepository.DeleteProvider(id)) { return(Content("false")); } else { return(Content("true")); } }