Giter Club home page Giter Club logo

csharp-access-sqlite's Introduction

Connect to a SQLite Database using C

This repository contains a sample code project that demonstrates how to use the Entity Framework Core library to connect to and query data from a SQLite database using C#.

The code in this repository connects to a SQLite database in the same folder named blogging.db and uses EF Core to read from its data. The code demonstrates how to map database entities to C# classes and use the C# classes in place of the database entities. The repository also shows the same functionality implemented in Dapper and ADO.NET, to demonstrate the amount of operations and tasks that is abstracted by EF Core.

This sample draws from this tutorial for Getting Started with EF Core with SQLite.

Prerequisites

Installation

  • Clone or download the repository to your local machine.

  • Use Visual Studio to debug and run the project.

The sample code samples depend on having an existing database to connect to and query. This database is called blogging.db and located in the same folder.

Run

Each code sample has the same functionality implemented in a different way. When run, the code will generate a console app that connects to a SQLite database and queries it for all the blog posts stored.

Contribution

If you wish to contribute, you can submit a pull request.

Overall, this code is intended to provide a basic understanding of how Entity Framework Core can be used to interact with a SQLite database in a C# application, and should not be used as-is in a production environment. Instead, this code should be used as the beginning passage to build your database application.

Please let me know if you need more help by creating an issue.

csharp-access-sqlite's People

Contributors

jcjiang avatar bricelam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.