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); }
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" }); } }
public int AddEvent(Event e) { return(edal.AddEvent(e) ?? 0); }