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