public ActionResult <ShiftDto> Createshift(ShiftForCreationDto shift) { var shiftEntity = _mapper.Map <Shift>(shift); _shiftRepository.AddShift(shiftEntity); _shiftRepository.Save(); var shiftToReturn = _mapper.Map <ShiftDto>(shiftEntity); return(CreatedAtRoute("Getshift", new { shiftId = shiftToReturn.Id }, shiftToReturn)); }
public void AddShift(Shift shift) { shiftRepos.AddShift(shift); }