public void CreateBarber(CreateBarberPostModel model) { if (string.IsNullOrWhiteSpace(model.Phone)) { throw new Exception("Phone number is reuqired to add barber"); } if (string.IsNullOrWhiteSpace(model.FullName)) { throw new Exception("Full Name is required to add barber"); } var barber = _mapper.Map <BarberModel>(model); _barberService.CreateBarber(barber); }