LINQ to SQL: Multiple / Single .dbml per project?

后端 未结 7 1139
悲哀的现实
悲哀的现实 2020-12-14 11:12

I\'ve read Rick Strahl\'s article on Linq to SQL DataContext Lifetime Management hoping to find some answers on how I would manage my .dbml files since they are so closely r

7条回答
  •  旧巷少年郎
    2020-12-14 11:37

    The answer is tricky because it's what the situation requires. I try to logically separate each DBML into contexts (after all, the DBML provides the DataContext functionality). So if my app has a single context, then it doesn't make sense for me to have a separate DBML for each table. Context is king when creating your DBML files is what I say.

提交回复
热议问题