Exemple #1
0
 /// <summary>
 /// Converts clinic DAL model to clinic API model
 /// </summary>
 /// <param name="clinic">The clinic to convert</param>
 /// <returns>Converted clinic</returns>
 private Clinic BuildClinic(API.DAL.Models.Clinic clinic)
 {
     return(new Clinic
     {
         Id = clinic.Id,
         Name = clinic.Name,
         Address = clinic.Address,
         ZipCode = clinic.ZipCode,
         City = clinic.CityName,
         PhoneNo = clinic.PhoneNo,
         Description = clinic.Description
     });
 }
Exemple #2
0
 /// <summary>
 /// Creates a new clinic
 /// </summary>
 /// <param name="clinic">The clinic that is being created</param>
 // POST: api/clinic
 public void Post([FromBody] API.DAL.Models.Clinic clinic)
 {
     _clinicRepository.Create(clinic);
 }