Exemple #1
0
        public void AddEventTest(string name, string address, string description, string time)
        {
            Event c = new Event {
                Name_Event = name, Address_Event = address, Description = description, Time = time
            };
            int?result = eventDal.AddEvent(c);

            Assert.NotNull(result);
            Assert.True((result ?? 0) > 0);
        }
Exemple #2
0
        public ResultModel AddEvent(AddEventModel model)
        {
            if (!string.IsNullOrEmpty(model.City) &&
                !string.IsNullOrEmpty(model.Description) &&
                !string.IsNullOrEmpty(model.Name) &&
                !string.IsNullOrEmpty(model.StartDate.ToString()))
            {
                return(eventDal.AddEvent(model));
            }

            else
            {
                return(new ResultModel()
                {
                    IsSuccess = false,
                    Message = "Do not leave empty spaces"
                });
            }
        }
Exemple #3
0
 public int AddEvent(Event e)
 {
     return(edal.AddEvent(e) ?? 0);
 }