/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> public Guid Add(HallModel model) { Hall hall = Mapper.Map <Hall>(model); string errors = Validate(hall); if (errors != null) { throw new ValidationException(errors); } _hallRepository.Insert(hall); return(hall.Id); }
public bool CreateHall(Hall hall) { hallRepository.Insert(hall); return(hallRepository.SaveChanges() > 0); }