我有一个相当简单的复合一对多关系,使用POCO/Fluent API定义,其中一列是一个字符串.
我发现我们数据库中这一栏中的数据在案例方面是不一致的,即'abb','ABB' - 这是我们的主要ERP系统,并且由各种来源提供,这些来源主要是我们无法控制的.
这在加入相关表时首先使用EF代码时出现问题,因为当PK/FK的情况不同时,即使SQL Profiler显示正在执行的SQL和返回的结果,EF也会默认忽略该连接.
我正在使用WCF,因此关闭了延迟加载和代理创建,并且急于使用Include加载所需的相关实体.例如.
var member = context.Member.Include(m => m.Audits).First(m => m.Id == id);
Run Code Online (Sandbox Code Playgroud)
除了修改数据库模式之外,还有其他解决方案吗?
fluent-interface code-first ef-code-first entity-framework-4.1
我的用例是:
所有这些都可以通过直接的Azure AD/B2C实现,还是应该查看其他身份提供商,例如IdentityServer/Auth0?
编辑1
我在AAD应用程序/用户和B2C应用程序/用户之间变得非常困惑,在这种情况下很少有关于使用什么的指导.
使用https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-devquickstarts-graph-dotnet作为起点我在插入客户端ID时得到以下结果秘密来自:
在这一点上,我不知道我的方案的正确方法是什么.
asp.net-web-api azure-active-directory auth0 identityserver3 azure-ad-b2c
给定 FooRequest 和 FooResponse 是抽象的接口:
public interface IFooHandler<TRequest, TResponse> where TRequest : FooRequest where TResponse : FooResponse
{
TResponse CheckFoo(TRequest request);
}
Run Code Online (Sandbox Code Playgroud)
实施:
public class MyFooHandler : IFooHandler<MyFooRequest, MyFooResponse>
{
public MyFooResponse CheckFoo(MyFooRequest request)
{
/* check for foos */
}
}
Run Code Online (Sandbox Code Playgroud)
我如何在温莎城堡中注册它,以便我可以使用(其中 IoCContainer 是 WindsorContainer:
Global.IoCContainer.Resolve<IFooHandler<FooRequest, FooResponse>>();
Run Code Online (Sandbox Code Playgroud)
解析 MyFooHandler 的实例?