public User CreateUser(string email, string password)
        {
            IEnumerable <char> cutName = email.TakeWhile(e => e != '@');
            User user = new User {
                Email = email, ConfirmedEmail = false, Name = new String(cutName.ToList().ToArray()), Password = password, Views = null
            };

            work.Users.Create(user);
            work.Save();
            return(user);
        }
Exemple #2
0
        public User CreateUser(string email, string password)
        {
            string cutName = email.Trim(new char[] { '@' });
            User   user    = new User {
                Email = email, IsConfirmedEmail = false, Name = cutName, Password = password, Views = null
            };

            work.Users.Create(user);
            work.Save();
            return(user);
        }
Exemple #3
0
 public Movie CreateMovie(Movie movie)
 {
     work.Movies.Create(movie);
     work.Save();
     return(work.Movies.Items.ToList().LastOrDefault(e => e.Name == movie.Name));
 }