开发者

Should DAO objects be Classes or Structs?

开发者 https://www.devze.com 2023-01-27 07:43 出处:网络
I wanted to know from a performance point of v开发者_运维知识库iew, should DAOs 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消