public ActionResult Delete() { var rolelist = Request.Form["arrselections"]; IEnumerable <ModuleVM> list = JsonConvert.DeserializeObject <List <ModuleVM> >(rolelist); var result = _moduleService.Delete(list); result.Message = result.Message ?? result.ResultType.GetDescription(); return(Json(result)); }
public ActionResult Delete(string Id) { var model = new ModuleModel(); model.Id = Id; UpdateBaseData(model); OperationResult result = ModuleService.Delete(model); return(Json(result)); }
public async Task Update_Subject_State_On_Delete(Mock <IAuthorizationService> authorizationService, Mock <IStateService> stateService, Module module) { stateService.Setup(x => x.UpdateSubjectState(It.IsAny <Guid>(), It.IsAny <CancellationToken>())); var context = TestSetup.SetupContext(); var httpContext = TestSetup.SetupHttpContext(); await context.Modules.AddAsync(module); await context.SaveChangesAsync(); var service = new ModuleService(context, httpContext, authorizationService.Object, stateService.Object); await service.Delete(module.Id); stateService.VerifyAll(); }
public override void TestFixtureTearDown() { base.TestFixtureTearDown(); ModuleService moduleService = new ModuleService(); moduleService.Delete(_module.ID); ProjectService projectService = new ProjectService(); projectService.Delete(_project.ID); UserService userService = new UserService(); userService.Delete(_developer.ID); }
public ActionResult Delete(int Id) { OperationResult result = ModuleService.Delete(Id); return(Json(result)); }
public override void Delete(List <int> ids) { moduleService.Delete(ids); }