public async Task <IActionResult> AddPharmacy([FromBody] PharmacyAddDto model) { if (!ModelState.IsValid) { return(BadRequest()); } var pharmacyResult = new Pharmacy() { PharmacyName = model.PharmacyName, Photo = model.Photo, Latitude = model.Latitude, Longitude = model.Longitude }; _pharmacyRepository.AddPharmacy(pharmacyResult); if (_pharmacyRepository.SaveChanges() > 0) { return(Ok()); } return(BadRequest()); }