What ORM for .net should I use?

前端 未结 9 2490
灰色年华
灰色年华 2020-12-04 22:44

I\'m relatively new to .NET and have being using Linq2Sql for a almost a year, but it lacks some of the features I\'m looking for now.

I\'m going to start a new pro

9条回答
  •  半阙折子戏
    2020-12-04 23:47

    I know this question is almost 8 years old, but at least if there is a straggler to this question, they will get a more complete picture of the ORMs available.

    We've been using Dapper for database access. It's very lightweight. It's extremely fast. I still get to write SQL (which is my preference). It automatically maps returned data into objects, even a dynamic object. You can add extensions that will insert, update, etc without the need for SQL. So you can build it up to more closely emulate a full ORM.

    Once you start using it, you'll be shocked how you lived without it. It should ship with the .NET framework.

    It's database agnostic, BUT the SQL you write may not be. So if you are writing your own SQL, you'd have to ensure it works on your target databases.

提交回复
热议问题