/// <summary> /// Crea un nuevo usuario /// </summary> /// <param name="firstName"></param> /// <param name="lastName"></param> /// <param name="email"></param> /// <param name="password"></param> /// <returns></returns> public User CreateUser(User user) { using (var context = new RegistrationEntities()) { int userID = (int)context.spInsertUser(user.FirstName, user.LastName, user.Email, (long?)user.FacebookID.ToNull(), user.Password).FirstOrDefault().UserID; return(SelectUserByID(userID)); } }