你的位置: 码友网首页 / 资讯源列表 / Working efficiently with legacy database using Dapper

关于[Working efficiently with legacy database using Dapper]的摘要:

A year ago I started working on a set of projects that requires accessing data from a huge legacy database. There was a decision to use Dapper to facilitate database access code. For those of you who are not familiar with Dapper, it’s a set of extension methods to IDbConnection, which allows to easily map C# object to SQL query parameters, as well as SQL query result to C# objects. I was quite skeptical to use a library that requires writing SQL queries directly in the C# code, because I got used to relying always on ORMs (NHibernate in particular). Throughout the year, Dapper has proven to be the right tool for the job. In the meantime, I also discovered a couple of features and tricks that allow me to write quite concise and easy to maintain database access code, and I think it’s worth sharing them here.

原文地址: https://cezarypiatek.github.io/post/dapper-tips-and-tricks/

收录时间: 2020-08-04 浏览量: 1470 分类: .NET

| 0 收藏 | 0