public bool AddBook(Book book)
        {
            try
            {
                _dbcontext.Entry(book).State = EntityState.Added;
                _dbcontext.SaveChanges();

                return(true);
            }
            catch
            {
                return(false);
            }
        }
        public bool AddNewCategory(Category category)
        {
            try
            {
                _dbcontext.Entry(category).State = EntityState.Added;
                _dbcontext.SaveChanges();

                return(true);
            }
            catch
            {
                return(false);
            }
        }
Exemple #3
0
        public bool AddLend(Lend l)
        {
            try
            {
                _dbcontext.Entry(l).State = EntityState.Added;
                _dbcontext.SaveChanges();

                return(true);
            }
            catch
            {
                return(false);
            }
        }