public void UpdatePersonalQuality(PersonalQualityModel model)
 {
     if (model.Id == null)
     {
         return;
     }
     if (_personalQualityRepository.Has(model.Id.Value))
     {
         var entity = model.ToEntity();
         _personalQualityRepository.Update(entity);
     }
 }
Example #2
0
 public static PersonalQuality ToEntity(this PersonalQualityModel model)
 {
     if (model == null)
     {
         throw new NullReferenceException("PersonalQualityModel is null");
     }
     return(new PersonalQuality()
     {
         Id = model.Id.Value,
         Name = model.Name,
         ResumeId = model.ResumeId
     });
 }
 public void AddPersonalQuality(PersonalQualityModel model)
 {
     _personalQualityRepository.Add(model.ToEntity());
 }