public User Register(User user) { using (MMW.Data.MusicWorldEntities entities = new MusicWorldEntities()) { mw_User dbUser = new mw_User(); dbUser.Email_Address = user.EmailAddress; dbUser.Password = user.Password; dbUser.First_Name = user.FirstName; dbUser.Display_Name = user.DispalyName; entities.mw_User.Add(dbUser); entities.SaveChanges(); user.UserId = dbUser.User_Id; return(user); } }