public Response <ContactAllergyDetailsViewModel> UpdateAllergyDetail(ContactAllergyDetailsViewModel allergy)
        {
            string apiUrl = BaseRoute + "UpdateAllergyDetail";

            var response = _communicationManager.Put <ContactAllergyDetailsModel, Response <ContactAllergyDetailsModel> >(allergy.ToModel(), apiUrl);

            return(response.ToModel());
        }
Ejemplo n.º 2
0
        public static ContactAllergyDetailsModel ToModel(this ContactAllergyDetailsViewModel entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var model = new ContactAllergyDetailsModel
            {
                ContactAllergyDetailID = entity.ContactAllergyDetailID,
                ContactAllergyID       = entity.ContactAllergyID,
                AllergyID  = entity.AllergyID,
                SeverityID = entity.SeverityID,
                Symptoms   = entity.Symptoms,
                ModifiedOn = entity.ModifiedOn
            };

            return(model);
        }
 public Response <ContactAllergyDetailsViewModel> UpdateAllergyDetail(ContactAllergyDetailsViewModel allergy)
 {
     return(_allergyRepository.UpdateAllergyDetail(allergy));
 }