我想使用我在查询中创建的方法,因为我需要实现一种特殊类型的过滤器...
return manager.Clients.SelectAll().Where(cli => cli.Name.SatisfyFilter(filter.Name) && cli.LastName.SatisfyFilter(filter.LastName) && cli.MiddleName.SatisfyFilter(filter.MiddleName)).ToList();
Run Code Online (Sandbox Code Playgroud)
但我明白了:
"方法'布尔SatisfyFilter(System.String,System.String)'没有支持的SQL转换."
错误
我的方法是:
public static bool SatisfyFilter(this string palavra, string filtro)
Run Code Online (Sandbox Code Playgroud)
同样的事情
public bool Contains(string value)
Run Code Online (Sandbox Code Playgroud)
在字符串类型中,Contains工作得很好......
我需要这个方法在IQueryable上运行,因为我的表有2500万个客户端......
我在sql profiler上看到包含在sql中被转换...
我如何实现我的方法将相关的过滤器代码发送到sql?= /
我找到了这些:
我正在尝试将上述示例中的知识应用到我自己的Web API中.
我的客户将是Android和IOS原生应用程序.
客户已经使用Facebook sdk来请求令牌.
但是,我如何使用此令牌来验证我的用户?
我会喜欢一些例子.
PS.:我使用DNX Core dnxcore50作为框架.
编辑:
我设法使用以下方法使用Facebook身份验证:aspnet/Security/samples/SocialSample/Startup.cs
但是响应是一个HTML到Facebook ...我不认为这是WebAPI应该如何...
我遵循了这个教程(至少基于我的WCF,因为我需要同样的工作):http: //www.eggheadcafe.com/tutorials/wcf/b5ada8df-58c5-492f-b368-457b3a4f137c/notify-client-应用-使用的WCF,callbacks.aspx
它在我的电脑上工作得很好,但我需要通过互联网使用它.在尝试这样做时,我听说(通过互联网)最好使用netTcpBiding.
我将拥有一台能够了解在线客户数量的服务器.我想在服务器上的IIS上使用WFC服务,并使用Windows服务并通知它.我需要回调因为服务器有时必须能够在客户端上执行一些命令.
如果有人能帮助我,我会很高兴.
提前致谢,
编辑:
让自己明确:我无法让它在互联网上运作.你们能告诉我如何更改配置(Web.config e App.config)以使用netTcpBinding并通过互联网工作?
再次感谢,
编辑2:
我的WCFServiceApplication中的Web.config是:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_IPCWatcherWCFService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" />
<security mode="Message">
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="TiT.PCWatcher.Server.WCFService.Services.PCWatcherWCFServiceBehavior" name="TiT.PCWatcher.Server.WCFService.Services.PCWatcherWCFService">
<endpoint address="" binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_IPCWatcherWCFService" contract="TiT.PCWatcher.Server.WCFService.Interfaces.IPCWatcherWCFService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" …
Run Code Online (Sandbox Code Playgroud)