Esempio n. 1
0
        /// <summary>
        /// Map User
        /// </summary>
        /// <param name="user"></param>
        /// <returns>new BllUser same as user</returns>
        public static ProfileModel ToViewProfileModel(this BllProfile profile)
        {
            if (ReferenceEquals(profile, null))
            {
                return(null);
            }
            ProfileModel result = new ProfileModel()
            {
                Id             = profile.Id,
                LastName       = profile.LastName,
                BirthDay       = profile.BirthDay,
                Gender         = profile.Gender,
                RelationStatus = profile.RelationStatus,
                FirstName      = profile.FirstName,
                AvatarId       = profile.AvatarId,
                City           = profile.City,
                Friends        = profile.Friends,
                IsNewInvite    = profile.IsNewInvites
            };

            return(result);
        }
Esempio n. 2
0
 public void Update(BllProfile profile)
 {
     uow.Profiles.Update(profile.ToDalProfile());
     uow.Commit();
 }
Esempio n. 3
0
 /// <summary>
 /// Updates a profile
 /// </summary>
 /// <param name="entity">Profile</param>
 public void Update(BllProfile entity)
 {
     throw new NotImplementedException();
 }
Esempio n. 4
0
 /// <summary>
 /// Updates the user's id on the profile
 /// </summary>
 /// <param name="entity">Profile</param>
 /// <param name="id">User id</param>
 public void UpdateUserId(BllProfile entity, int id)
 {
     profileRepository.UpdateUserId(entity.ToDalProfile(), id);
     unitOfWork.Commit();
 }
Esempio n. 5
0
 /// <summary>
 /// Deletes a profile
 /// </summary>
 /// <param name="entity">Profile</param>
 public void Delete(BllProfile entity)
 {
     profileRepository.Delete(entity.ToDalProfile());
     unitOfWork.Commit();
 }