public IHttpActionResult Update(domain.Event domainEvent) { if (domainEvent == null) { return(BadRequest("Invalid Request")); } _eventService.Update(domainEvent); return(Ok()); }
public void Add(domain.Event domainEvent) { data.Event dataEvent = new data.Event(); dataEvent.Name = domainEvent.Name; dataEvent.Description = domainEvent.Description; dataEvent.Date = domainEvent.Date; dataEvent.Vanue = domainEvent.Vanue; dataEvent.ContactPerson = domainEvent.ContactPerson; dataEvent.EmailId = domainEvent.EmailId; dataEvent.CreatedDate = DateTime.Now; dataEvent.UpdatedDate = DateTime.Now; eventReopsitories.Add(dataEvent); }
public domain.Event GetEventById(int Id) { var events = eventReopsitories.GetEventById(Id); domain.Event obj = new domain.Event() { Id = events.Id, Name = events.Name, Description = events.Description, Date = events.Date, Vanue = events.Vanue, ContactPerson = events.ContactPerson, EmailId = events.EmailId, }; return(obj); }