我问:
asp.net 3.5中有两种模板
1) 动态数据 Web 应用程序。
2) 动态数据 Web 应用程序。实体
我的 SQL 数据库有 Customer Table ;列:ID、姓名、姓氏与姓名
如果您使用第一个(动态数据 Web 应用程序);你看不到 ID 列(客户表)(Linq to Sql)
但是如果你使用第二个(Dynamic Data Web App.Entities),你可以看到 ID 列
我如何过滤列,尤其是 ID 区域。我是说; 我需要 ID 列可见 =false
你说:
In your metadata class, set the Id to the following:
[ScaffoldColumn(false)]
public object Id { get; set; }
In case you don't have a reference to the metadata class, you add this by adding the attribute to the partial class, something like this:
[MetadataType(typeof(MyEntityFromTable_MD))]
public partial class MyEntityFromTable
{
}
Then you need the metadata class itself. Something like:
public class MyEntityFromTable_MD
{
[ScaffoldColumn(false)]
public object Id;
}
你是对的!但如果我尝试搜索。我找到这个链接:
http://mattberseth.com/blog/2008/08/dynamic_data_and_custom_metada.html
http://mattberseth.com/blog/2008/08/aspnet_dynamic_data_simple_5_t.html
我读。我明白提出我的要求:我需要 App_code 但我找不到它!我怎样才能找到 App_code