English 中文(简体)
最佳做法、从数据库中装载模型物体[封闭]
原标题:Best practices, loading model objects from database [closed]
  • 时间:2011-09-14 23:54:31
  •  标签:
  • c#
Closed. This question is opinion-based. It is not currently accepting answers.

I 摘录以下示范类:

public class Product
{
  public int ProductID {get;set;}
  public string ProductName {get;set; ]
  public int ActiveOrdersCount {get;set;}
  public Category[] Categories {get;set}
     //etc...
}

当我从数据库中装载一个产品时,我装上所有特性,并可能 la上这些类别。

装载物体或部分成分的所有特性是否更有意义?

最佳回答

它取决于这些物体在运行时如何进入。 如果你想要立即获得收集的所有产品的类别,那么 la的装载将是非常可知的。

在另一端,如果你只想打上交回价值中一小部分的地块财产,则电荷装载可能是有益的。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签