public ActionResult Create(NosSession session) { if (null != session && !string.IsNullOrEmpty(session.OwnerTag)) { IAttendee attendee = _attendeeRepository.Get(session.OwnerTag); session.Owner = attendee.FirstName + " " + attendee.LastName; session.CreatedOn = DateTime.Now; session.Start = DateTime.Now; session.End = DateTime.Now; _sessionRepository.Insert(session); } return RedirectToAction("Index"); }
public HttpResponseMessage<NosSession> Put(NosSession session, HttpRequestMessage<NosSession> request) { _sessionRepository.Update(session); session = _sessionRepository.Get(session.Id) as NosSession; return new HttpResponseMessage<NosSession>(session, HttpStatusCode.Accepted); }