Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     var dbContext = new BooksLibraryDbContext();
     this.users = new EfGenericRepository<User>(dbContext);
     this.books = new EfGenericRepository<Book>(dbContext);
     this.BindBooks();
 }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var dbContext = new BooksLibraryDbContext();
            this.books = new EfGenericRepository<Book>(dbContext);
            this.comments = new EfGenericRepository<Comment>(dbContext);
            this.users = new EfGenericRepository<User>(dbContext);
            this.BindComments(0);

            if (!this.User.Identity.IsAuthenticated)
            {
                this.addCommentContainer.Attributes.Add("style", "display:none");
            }

            //this.tbComment.Text = string.Empty;
        }