public IUserAuth CreateUserAuth(IUserAuth newUser, string password) { var user = new Model.User() { Firstname = newUser.FirstName, Lastname = newUser.LastName, Email = newUser.Email, Password = newUser.PasswordHash }; _context.Users.Add(user); _context.SaveChanges(); return(newUser); }
public object Any(Services.SetFullName request) { SiteInfoModel siteInformation = dbContext.SiteInfo.SingleOrDefault(); if (siteInformation == null) { siteInformation = new SiteInfoModel(); siteInformation.Version = 1; siteInformation.Name = request.FullName; dbContext.SiteInfo.Add(siteInformation); } siteInformation.Name = request.FullName; siteInformation.Version = siteInformation.Version + 1; dbContext.SaveChanges(); return(true); }