How to access data from SQLite database using Dapper micro-ORM (In ASP.NET Core 3.1)

Поделиться
HTML-код
  • Опубликовано: 1 авг 2020
  • SQLite is a small, fast, full-featured SQL database engine, that is written in C. And it runs in the same process as the application itself. It is highly reliable and self-contained. In this video, I am going to walk through how to use SQLite with Dapper (a Micro-ORM).
    Just like any other database, if we want to use the SQLite database engine from an ASP.NET Core application, we will need to work with either ADO.NET or an ORM Framework.
    Dapper is a high-performance micro-ORM. and it is one of the easiest to use ORM framework in my opinion. It is built with extension methods on the IDBConnection interface. And it works with most of the popular RDBMS databases out there.
    I have other videos on Dapper here for your reference: dotnetcorecentral.com/blog/as...
    In this video, I will mainly cover, how to create and read data from an SQLite database using Dapper. And as a part of the process, I will show how to create a table in the SQLite process and discuss the concept of rowid in SQLite.
    The blog post associated with this video is available here: dotnetcorecentral.com/blog/ho...
    The source code for this blog post is available in GitHub repo here: github.com/choudhurynirjhar/s...
  • НаукаНаука

Комментарии • 16

  • @rafapioli75
    @rafapioli75 3 года назад

    Very clear explanation! Thanks!

  • @glendamabasa6423
    @glendamabasa6423 3 года назад +1

    This is a GREAT video thank you very much

  • @aralpaudel
    @aralpaudel 3 года назад

    Good video tutorial on dapper.

  • @dogukankurt6778
    @dogukankurt6778 3 года назад

    Thank you!

  • @allvirus4262
    @allvirus4262 4 года назад

    NICE!~

  • @glendamabasa6423
    @glendamabasa6423 3 года назад

    Do I still need to create the Product table if I dont want it in my database?
    Like I want my application to read everything from the database nothing should be created in code

    • @DotNetCoreCentral
      @DotNetCoreCentral  3 года назад

      @Glenda Mabasa, some process needs to create data into the database, if the data already exists, yes you can just read the data, you do not have to create the data.

  • @karanchadha8371
    @karanchadha8371 3 года назад

    Can you please help me getting a single product based on id. I would be so greatful to you

    • @DotNetCoreCentral
      @DotNetCoreCentral  3 года назад

      @karan chadha, thanks for watching the video!
      To access a single product based on id, you can use something like this:
      connection
      .QueryFirstOrDefaultAsync("Your Stored Procedure", new { productId }, commandType: CommandType.StoredProcedure);

  • @user-xx9jb7yz6s
    @user-xx9jb7yz6s 2 года назад

    I want the name of the program