Giter VIP home page Giter VIP logo

dappercoretutorial's Introduction

[TR] Dapper ORM'ine ait metotları barındıran unit test projesidir. .NET 6 alt yapısına sahiptir. Northwind veritabanı kullanılmıştır. 15.11.2021'de bütün projeleri .NET 6'ya yükselttim.

image

DapperUnitTest.cs'de örnek testleri bulabilirsiniz. DataAccess projesinde Dapper için GenericRepository tasarımı yapıldı. Her entity için Abstract interface ve Concrete sınıflar oluşturuldu. Dapper.Contrib nuget paketi kurularak metotları temel CRUD işlemleri için geliştirildi.

image

DataAccess projesinde Abstract interfacede oluşturulan metotlar, generic repositorydeki ortak metotlara ek olarak oluşturulabilir.

IProductDal

image

DapperProductDal

image

Business projesinde ise QueryMethods ve ExecuteMethods dosyaları bulunur. Bu dosyalar sırasıyla Dapper'a ait Query ve Execute methodları barındırdığı için isimler bu şekilde ayrılmıştır. Ayrıca Asenkron işlemleri de desteklediği için DapperAsyncMethods dosyası da bulunur.

Generic repository metotlarını kullanacak iş metotları, her entity için Abstract interface ve Concrete sınıflarda oluşturuldu.

Models projesinde ise Northwind'e uyumlu entityler mevcuttur.(Products, Categories tabloları vs.)

[EN] This project is Unit Test Project that runs DapperORM methods. It creates with .NET 6 Northwind used as example database. In 15.11.2021, all class libraries migrated from .NET 5 to .NET 6

DapperUnitTest.cs has sample tests for some Dapper methods from Business project.

DataAccess project includes GenericRepository for Dapper. Dapper.Contrib nuget package added on this project to design generic repository easily. Created Abstract interfaces and Concrete classses for each entities. This enhancement satisfies basic CRUD operations.

Methods in Abstract interfaces on DataAccess project are additional operations to generic repository common methods.

Business project includes QueryMethods ve ExecuteMethods class files which have Dapper's built-in Query ve Execute methods respectively. Also, the project includes DapperAsyncMethods file which has async built in functions to support asynchronous operations. Created Abstract interfaces and Concrete classses for each entities which methods work for their business.

Models project has entities of Northwind database.(Products, Categories tables etc.)

dappercoretutorial's People

Contributors

kivanckara avatar mertmtn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.