public bool RegistrUser(string userName, string password) { var userRepo = _userRepo .Query() .FirstOrDefault(x => x.UserName == userName); if (userRepo != null) return false; var user = new User { UserName = userName, AvatarUrl = "../Content/Images/defaultAva.jpg" }; _userRepo.Create(user); _userRepo.Save(); var authUser = new AuthUser { Password = password, UserId = user.Id }; _aythUserRepo.Create(authUser); _aythUserRepo.Save(); return true; }
public PostGetVm(User user, DateTime date) { User = user; Date = date; }
public CommentGetVm(User user, DateTime date) { User = user; Date = date; }