public AddHumanitarianEventResponse AddHumanitarianEvent(AddHumanitarianEventRequest request)
 {
     AddHumanitarianEventResponse response = new AddHumanitarianEventResponse();
     var dao = new HumanitarianDao();
     dao.AddHumanitarianEvent(request);
     return response;
 }
コード例 #2
0
        public AddHumanitarianEventResponse AddHumanitarianEvent(AddHumanitarianEventRequest request)
        {
            var response = new AddHumanitarianEventResponse();

            using(var context = new HumanitarianEventContext())
            {
                request.EventToAdd.Id = Guid.NewGuid();
                request.EventToAdd.LastModifiedDateTime = DateTime.Now;
                request.EventToAdd.LastModifiedUser = "******";
                context.HumanitarianEvents.Add(request.EventToAdd);
                context.SaveChanges();
            }
            return response;
        }