Should DAO objects be Classes or Structs?
I wanted to know from a performance point of v开发者_运维知识库iew, should DAOs be classes or structs?
Taking into consideration that a lot of them might be created and they might be long lived objects.
What are your views and suggestions around the Data Layer design and using structs as DAOs
THey should be objects.
You should only build structs if you are building a value type. such as: example: id.
Other than that, you should use object for Data access.
精彩评论