Beispiel #1
0
        public IActionResult Post([FromBody] TimeSlotViewModel value)
        {
            //ignore the end date for now
            value.EndDatetime = value.BeginDatetime.AddHours(1).AddMinutes(-1);


            var added = _mapper.Map <TimeSlotViewModel, TimeSlot>(value);

            return(StatusCode((int)HttpStatusCode.Created, _timeSlots.Add(added)));
        }