Exemple #1
0
 public Domain.UserPersonalization Convert(UserCustomization entity)
 {
     return(new Domain.UserPersonalization()
     {
         Id = entity.UserCustomizationId,
         Name = entity.Name,
         Value = entity.Value,
         OwnerId = entity.OwnerId
     });
 }
Exemple #2
0
        public bool Set(Domain.UserPersonalization userPersonalization)
        {
            UserCustomization entity = Convert(userPersonalization);

            if (_userPersonalizationRepository.Exists(x => x.OwnerId == entity.OwnerId))
            {
                return(_userPersonalizationRepository.Update(entity));
            }
            else
            {
                return(_userPersonalizationRepository.Create(entity));
            }
        }