Simple Data Access Layer

后端 未结 9 596
野趣味
野趣味 2021-02-06 17:33

Can anyone suggest a simple Data Access Layer (C# .NET)? Not keen on using the Microsoft Application Data Access block, seems very bloated and overkill. Also don\'t want to use

相关标签:
9条回答
  • 2021-02-06 18:11

    Check out DbExtensions, you can use it to simplify DAL code, or you can build your own ORM on top.

    0 讨论(0)
  • 2021-02-06 18:13

    Before you can make your decisions there are some questions that you have to answer to yourself before begin, not just if you dont want linq or ms data access layer those are some of that questions:

    • Do you want to be able to modify the code (generator) or do you want a DAL that gives you the service of accesing the DB?
    • Do you want to deal with XML configuration files or do you prefer a DAL based on reflection?
    • Do you want support for multiple DBs or you can live with an specific one?

    Some years ago I had to build a DAL for the company I was working for and resulted that it was easier than I though, the result was an ORM based on reflection who supports many DBs at this time SqlServer, Oracle, PostgreSql and SqLite, I can share the code for you it may help you build your own or extend it to your needs.

    If it helps you for anything build your own DAL (if you havee the time) its a great learning experience you will learn some Sql and several features of the language that you might never use again.

    Good luck with that...

    0 讨论(0)
  • 2021-02-06 18:19

    I found this the other day:

    http://www.simple-talk.com/dotnet/.net-framework/.net-application-architecture-the-data-access-layer/

    0 讨论(0)
提交回复
热议问题