public async Task <BookDomain> UpdateBookById(BookDomain book)
        {
            BookEntity bookEntity = EntityDomainMapper.MapEntityToDomain(book);

            var GetBookByIds = await Context.bookEntity.AsNoTracking().SingleOrDefaultAsync(e => e.BookId.Equals(book.BookId));

            if (GetBookByIds == null)
            {
                throw new UserIdNotValidException(HttpStatusCode.NotFound, "BookIdNot Found", null);
            }
            Context.Database.EnsureCreated();
            Context.bookEntity.Update(bookEntity);
            await Context.SaveChangesAsync();

            return(book);
        }
        public async Task <BookDomain> AddNewBook(BookDomain book)
        {
            BookEntity bookEntity   = EntityDomainMapper.MapEntityToDomain(book);
            var        GetBookByIds = await Context.bookEntity.SingleOrDefaultAsync(e => e.BookId.Equals(book.BookId));

            if (GetBookByIds != null)
            {
                throw new BookIdAlridyPresent(HttpStatusCode.NotFound, "BookIdAlridyPresent", null);
            }

            Context.Database.EnsureCreated();
            Context.bookEntity.Add(bookEntity);
            await Context.SaveChangesAsync();

            return(book);
        }