public IActionResult RegisterRestaurant([FromBody] RestaurantDto item)
        {
            _mapperSession.BeginTransaction();
            _restaurantRepository.Save(item.GetDataItem());

            _mapperSession.Commit();
            _mapperSession.CloseTransaction();
            // TODO: TRY CATCH OR USING

            return(StatusCode(201));
        }
        public async Task <IActionResult> first()
        {
            _session.BeginTransaction();
            var bk = new Book();

            //   bk.Id = Guid.NewGuid();
            bk.Title = "test";
            await _session.Save(bk);

            var book = await _session.Books.FirstOrDefaultAsync();

            book.Title += " (sold out)";
            await _session.Save(book);

            await _session.Commit();

            var books = await _session.Books
                        .Where(b => b.Title.StartsWith("How to"))
                        .ToListAsync();

            return(Ok(bk));
        }