Ejemplo n.º 1
0
        private void SignIn()
        {
            User bookShelfUser = new User()
            {
                Email = UserEmail,
                Name = UserName,
                Password = UserPassword
            };
            _userRepository.Add(bookShelfUser);
            _userRepository.SaveChanges();

            MyBoooks myBoooks = new MyBoooks();
            myBoooks.Show();
            var window = Application.Current.Windows[0];
            window.Hide();
            
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Database.SetInitializer(
                new DropCreateDatabaseIfModelChanges<BookShelfContext>());
            
           
            
            var kernel = new StandardKernel(new NinjectConfiguration());
            var categoryrep = kernel.Get<IRepository<User>>();

            var user = new User()
            {
                Name = "Artur",
                Email = "*****@*****.**",
                Password = "******",

            };
            categoryrep.Add(user);
            categoryrep.SaveChanges();

             Console.WriteLine("add user successfuly");
            Console.ReadKey();
        } 
Ejemplo n.º 3
0
 private void LoadReadingList()
 {
     _userRepository = IoCManager.Kernel.Get<IRepository<User>>();
     _user = _userRepository.GetById(1);
     _readinglistContent = _user.ReadingList.RadingList;
 }