public async Task <IActionResult> CreateTerm([FromBody] NewTermModel term) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var termCreated = await _termService.CreateTermAsync(term.Date, term.OfferId, term.WorkerId, term.Price); return(CreatedAtAction("GetTerm", new { id = termCreated.TermId }, term)); }