Exemplo n.º 1
0
        public async Task Run()
        {
            Console.WriteLine("Hello DataRepo!");
            await _sqliteService.InitializeAsync("DataRepo.ConsoleApp");

            var title = string.Empty;

            while (string.IsNullOrEmpty(title))
            {
                Console.Write("Insert title: ");
                title = Console.ReadLine();
            }

            var item = new Models.Item
            {
                Title = title
            };

            await _itemRepository.AddAsync(item);

            var items = await _itemRepository.GetAllAsync();

            items?.ToList().ForEach(x => Console.WriteLine(x));
        }
Exemplo n.º 2
0
 public void SetupAsync()
 {
     _sqliteService.InitializeAsync("DataRepo.ConsoleApp").Wait();
 }