/// <summary> /// Is Used to get Comments that spicified user made to each kind of entity /// </summary> /// <param name="user"></param> /// <returns>All these comments</returns> public ICollection<Comment> GetAllByUser(User user) { return dbContext.Set<Comment>() .Where(comment => comment.Author == user) .ToList(); }
public void Create(User currentUser) { UserRepository.Create(currentUser); }
public void Save(User currentUser) { UserRepository.Update(currentUser); }
public bool SaveUser(User user) { return user.Id != 0 ? _userRepository.UpdateUser(user) : _userRepository.CreateUser(user); }