Ejemplo n.º 1
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);
        }
 public void Delete(int Id)
 {
     data.Event e = context.Event.Find(Id);
     context.Event.Remove(e);
     context.SaveChanges();
 }
 public void Update(data.Event e)
 {
     context.Entry(e).State = System.Data.Entity.EntityState.Modified;
     context.SaveChanges();
 }
 public void Add(data.Event e)
 {
     context.Event.Add(e);
     context.SaveChanges();
 }