![](/img/trans.png)
[英]How to add DbSet<EntityName> to a context that is generated dynamically with Codedom?
[英]Add WebService attributes to a class generated with CodeDom
我正在使用CodeDom為ASMX Web服務生成c-sharp類,但是在將Web服務屬性添加到該類時遇到了問題。 我正在嘗試獲得以下最終結果:
[WebService(Namespace = "http://schemas.me.com/mywebservice/", Name = "MyWebService")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class MyWebService : WebService
{
}
CodeTypeDeclaration
具有屬性CustomAttributes
。 如果在此添加CodeAttributeDeclaration
,則應該沒問題。 有關更多信息,請參見http://msdn.microsoft.com/zh-cn/library/system.codedom.codeattributedeclaration.aspx 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.