public void DeleteGroup(Guid id) { if (id != null) { var gr = _groupRepository.GetGroupById(id); if (gr != null) { _groupRepository.DeleteGroup(gr); } } }
/// <summary> /// /// </summary> /// <param name="request"></param> /// <returns></returns> public string Get(Routes.CMSDeleteGroup request) { try { IGroup cms = Helper.GetGrain <IGroup>(0); string response = cms.DeleteGroup(request.userName, request.token, request.groupObjectId).Result; return(response); } catch { return(Helper.AbnormalError); } }
public HttpResponseMessage Delete(int id) { try { _group.DeleteGroup(id); var response = new HttpResponseMessage() { StatusCode = HttpStatusCode.OK }; return(response); } catch (Exception) { var response = new HttpResponseMessage() { StatusCode = HttpStatusCode.InternalServerError }; return(response); } }
public ActionResult <Group> Delete(int id) { return(Ok(groupRepository.DeleteGroup(id))); }
public IActionResult DeleteGroup(int id) { _group.DeleteGroup(id); return(RedirectToAction("GroupList")); }