public async Task <ActionResult <Bank> > Post(string userId, MaintenanceCalendar model) { var user = await _accountRepository.GetByIdAsync(userId); model.User = user; var entity = await _genericRepository.CreateAsync(model); return(new CreatedAtRouteResult("GetMaintenanceCalendar", new { id = entity.Id }, entity)); }
public async Task <IActionResult> Put(string userId, int id, MaintenanceCalendar model) { model.Id = id; var user = await _accountRepository.GetByIdAsync(userId); model.User = user; await _genericRepository.UpdateAsync(model); return(NoContent()); }