Example #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);
        }
Example #2
0
 public void Update(BllProfile profile)
 {
     uow.Profiles.Update(profile.ToDalProfile());
     uow.Commit();
 }
Example #3
0
 /// <summary>
 /// Updates a profile
 /// </summary>
 /// <param name="entity">Profile</param>
 public void Update(BllProfile entity)
 {
     throw new NotImplementedException();
 }
Example #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();
 }
Example #5
0
 /// <summary>
 /// Deletes a profile
 /// </summary>
 /// <param name="entity">Profile</param>
 public void Delete(BllProfile entity)
 {
     profileRepository.Delete(entity.ToDalProfile());
     unitOfWork.Commit();
 }