public void Update(EditProfileViewModel model)
        {
            var profile = new UserProfile()
            {
                Id = model.Id,
                Bio = model.Bio,
                Email = model.Email,
                Name = model.Name,
                WebsiteUrl = model.Website
            };

            _profiles.Update(profile);

            _context.SaveChanges();
        }
        public User Create(string username, string password, 
            UserProfile profile, DateTime? created = null)
        {
            var user = new User()
            {
                Username = username,
                Password = Crypto.HashPassword(password),
                DateCreated = created.HasValue ? created.Value : DateTime.Now,
                Profile = profile
            };

            _users.Create(user);

            _context.SaveChanges();

            return user;
        }