public async Task Should_Create_New_Task_With_Title() { await _taskAppService.Create(new CreateTaskInput { Title = "Nowy", Description = "Opis", AssignedPersonId = 1 }); UsingDbContext(context => { var task1 = context.Tasks.FirstOrDefault(t => t.Title == "Nowy"); task1.ShouldNotBeNull(); }); }
public async System.Threading.Tasks.Task Should_Create_New_Task_With_Title() { await _taskAppService.Create(new CreateTaskInput { Title = "Newly created task #1" }); var task = await UsingDbContext(context => context.Tasks.FirstOrDefaultAsync(o => o.Title == "Newly created task #1")); task.ShouldNotBeNull(); }
public async System.Threading.Tasks.Task Should_Create_New_Task_With_Title() { await _taskAppService.Create(new DTO.CreateTaskInput { Title = "Newly created task #1" }); UsingDbContext(context => { var task1 = context.Tasks.FirstOrDefault(t => t.Title == "Newly created task #1"); task1.ShouldNotBeNull(); }); }
public IActionResult Create(CreateTaskInput item) { _taskAppService.Create(item); return(Success()); }
public void Create([FromBody] CreateTaskInput input) { var output = _taskAppService.Create(input); }
public async Task <IActionResult> Create([FromBody] CreateTaskInputModel inputModel) { await _taskAppService.Create(inputModel); return(Response()); }
public IActionResult Add(TaskVm taskVm) { _taskAppService.Create(taskVm); return(RedirectToAction("Index")); }