我有点困惑。我在我们使用 Linq To SQL 的一个项目中看到了一些代码
<MetadataType(GetType(Customer.CustomerMeta))> Partial Public Class Customer
Friend Class CustomerMeta
<Required(), StringLength(50)> Public Name As String
<Required(), StringLength(50)> Public Address As String
<Required(), StringLength(20)> Public EmailAddress As String
<StringLength(20)> Public Country As String
End Class
并且不确定为什么会这样创建它,但看起来使用的方法与我以前使用的方法不同。
在阅读之后,似乎该技术可能是脚手架(http://msdn.microsoft.com/en-us/library/cc488469(v=vs.90).aspx),但在本演练进行到一半时,我意识到很多领域都没有存在(如 global.asax 文件)或应用于我在其中看到上述代码的项目,因此我可能在错误的轨道上。
有谁知道上面使用了什么技术/框架,如果有我可以参考的文章,以加快速度?如果这里需要书籍或培训课程,那么我很高兴有人能指出我正确的方向。
谢谢