1
我有一个数据模型,需要跟踪更改。我可以每月对模型进行多达100,000次的更改/更新。我的模型涉及跟踪一项任务如何完成并可以分解为三种基本类型。应该使用什么模型结构来跟踪更改?
目前,我有我的模型是这样,但有分歧的各类三明治成3个独立的控制器,因为每个三明治是由非常不同:
public class Sandwich
{
public int Id { get; set; }
public int SandwichTypeId { get; set; } //This is an enum type
//About a dozen other properties that define HOW the sandwich gets made
}
,我就能把它拆开,这样更符合它我控制器:
public class PeanutButterAndJellySandwich
{
public int Id { get; set; }
//No enum sandwich type
//About a dozen other properties that define HOW the sandwich gets made
}
public class HamSandwich
{
public int Id { get; set; }
//No enum sandwich type
//About a dozen other properties that define HOW the sandwich gets made
}
//等
2部分问题:
- 是否有任何优势来分解模型?
- 如果是这样,那么这些优点是否会被击败?因为我将不得不添加单独的跟踪表?
谢谢。
谢谢Kensai。这是一个有趣的想法,我今天会看看。 – trevorc