public IHttpActionResult Update(domain.Event domainEvent)
 {
     if (domainEvent == null)
     {
         return(BadRequest("Invalid Request"));
     }
     _eventService.Update(domainEvent);
     return(Ok());
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }