首页 \ 问答 \ 指定自动生成的Web服务代理类的CLR名称空间(Specify CLR namespace of auto-generated web service proxy class)

指定自动生成的Web服务代理类的CLR名称空间(Specify CLR namespace of auto-generated web service proxy class)

在Visual Studio中的ASP.NET项目中添加Web引用时,始终会添加Web应用程序的根命名空间

因此,如果我添加一个名为MyWebService的Web引用,并且应用程序的默认名称空间是MyApplication ,则生成的代理类的名称空间将为: MyApplication.MyWebService

但是,我希望能够指定用于生成的类的命名空间跳过默认命名空间并简单地调用命名空间MyWebService)。

通过命令行使用wsdl.exe是实现此目的的唯一方法吗? 我不想手动编辑生成的类(因为它可以重新生成)。

任何帮助是极大的赞赏! :)


When you add a Web Reference in an ASP.NET project in Visual Studio the web application's root namespace is always added.

So, if I add a web reference called MyWebService and the default namespace of the application is MyApplication the namespace of the generated proxy class will be: MyApplication.MyWebService.

However, I want to be able to specify which namespace to use for the generated class (to skip the default namespace and have the namespace be called simply MyWebService).

Is using wsdl.exe through the command line the only way of accomplishing this? I don't want to manually edit the generated class (since it can get re-generated).

Any help is greatly appreciated! :)


原文:https://stackoverflow.com/questions/3685511
更新时间:2021-12-18 06:12

最满意答案

您可以使用BINARY关键字进行完全匹配

 SELECT tval FROM words WHERE BINARY  tval='1223-abc';

二进制是一个内置关键字,在WHERE子句之后强制进行区分大小写的匹配

小提琴


You can use the BINARY keyword for the exact match

 SELECT tval FROM words WHERE BINARY  tval='1223-abc';

Binary is a built-in keyword that after your WHERE clause that forces a comparison for an exact case-sensitive match

Fiddle

相关问答

更多
  • 它被称为相关的子查询。 它有它的用途。 It's called correlated subquery. It has it's uses.
  • 您只需将message添加到当前选择中即可。 SELECT DISTINCT person_send_id, person_receive_id, message FROM `message` WHERE person_send_id = 21 OR person_receive_id = 21; 而且我认为你会想要最新的,因为它将作为一个标题。 添加ORDER BY message_id DESC LIMIT 1 例如 SELECT DISTINCT person_send_id, person_ ...
  • 您可以使用HAVING子句, 可以查看别名,例如 HAVING avg_rating>5 但是在where子句中,您需要重复表达式,例如 WHERE (sum(reviews.rev_rating)/count(reviews.rev_id))>5 但! 并不是所有的表达式都将被允许 - 使用像SUM这样的聚合函数将不起作用,在这种情况下,您将需要使用HAVING子句。 从MySQL手册 : 不允许在WHERE子句中引用列别名,因为执行WHERE子句时,列值可能尚未确定。 参见B.1.5.4节“列别 ...
  • 尝试这个 : SELECT count(A.[processID]) Over (Partition by B.[processID]) AS total, B.[process] AS processName, (SELECT TOP 1 LocationDesc FROM dbo.EmployeeTable_Historical AS D WHERE C.leaver = D.QID A ...
  • 你是假设CFWheels不允许在where参数中使用SQL函数。 它解析字符串的属性名称,以便它可以将它们映射到数据库中的列,并且它还将绑定应用于的值。但是它无法解析对SQL函数的调用。 但是,您可以根据所需的SQL函数创建计算属性,并根据该函数进行查询。 在models/PriceList.cfc : function init() { property(name="startDateYear", sql="YEAR(pricelists.sta ...
  • 看来这是你的解决方案: SELECT ID, (dwStückzahl*dwLänge) AS dwLaufmeter, dwDicke, dwBreite, SS.sAuftrag, SS.sInfo1 FROM tblStückliste, (SELECT DISTINCT sAuftrag, sInfo1 FROM tblStückliste) SS WHERE sAuftrag = SS.sAuftrag AND sInfo1 = SS.sInfo1 该查询的作用是在tblStücklis ...
  • 您可以使用BINARY关键字进行完全匹配 SELECT tval FROM words WHERE BINARY tval='1223-abc'; 二进制是一个内置关键字,在WHERE子句之后强制进行区分大小写的匹配 小提琴 You can use the BINARY keyword for the exact match SELECT tval FROM words WHERE BINARY tval='1223-abc'; Binary is a built-in keyword that ...
  • 我不确定为什么你需要distinct (select distinct Workgroup from #grouping) 。 这里的问题是估计是关闭的。 没有看到整个查询和执行计划XML,我建议尝试这些替代方案: 在#temp表中选择workgroup和skills并加入其中 在语句中添加option(recompile) 每一个都应该是一个解决方案。 无论如何都要看到执行计划XML是有益的。 编辑(在审查执行计划之后,thx使其可用): 此查询位于分区视图上。 有了检查约束,我们可以看到根据@start ...
  • 您可以使用intersect来获取两个查询的公共结果。 Select left([Foundation_Account_Name],4) From [dbo].[tbl_Foundation_Account] INTERSECT Select left([Foundation Account Name],4) From [dbo].[Import_tbl_RDO] Where [Foundation Account Name] IS NOT NULL You can use intersect ...
  • 你当然可以通过将Variable作为表达式进行求值来实现。 例如,您的select语句可以写为以下变量表达式: "SELECT N'"+@[User::strStoreKey]+"' as StoreKey, a.saleprice, b.purchasecost FROM "+@[User::strTableName]+" AS a JOIN "+@[User::strAnotherTable]+" AS b ON a.ID = b.ID" 这里的变量必须使用String数据类型或 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)