public BllPost AddNewPost(string postContent, BllMembershipUser user, BllTopic topic, bool isTopicStarter) { var newPost = CreateNewPost(postContent, user, topic.Id, isTopicStarter); _postRepository.Insert(newPost.ToDalPost()); _uow.Save(); return newPost; }
private BllPost CreateNewPost(string content, BllMembershipUser user, Guid topicId, bool isTopicStarter) { if (content == null) return null; return new BllPost() { Id = Guid.NewGuid(), ParentTopicId = topicId, DateCreated = DateTime.UtcNow, DateEdited = (DateTime) SqlDateTime.MinValue, PostContent = content, IsTopicStarter = isTopicStarter, User = user }; }
public BllPost AddNewPost(string postContent, BllMembershipUser user, BllTopic topic, bool isTopicStarter) { return _postService.AddNewPost(postContent, user, topic, isTopicStarter); }
public void ApplyRoleForUser(BllMembershipRole role, BllMembershipUser user) { user.Roles.Add(role); _userRepository.Update(user.ToDalUser()); _uow.Save(); }
public void UpdateUser(BllMembershipUser user) { _userRepository.Update(user.ToDalUser()); _uow.Save(); }