Ejemplo n.º 1
0
 public DetailsModel(IContentGatewayFactory dbContextFactory)
 {
     this.LazyDbContext = dbContextFactory.ToLazyContentGateway(this);
 }
Ejemplo n.º 2
0
 public static Lazy <IContentGateway> ToLazyContext(this IContentGatewayFactory factory, PageModel page) =>
 new Lazy <IContentGateway>(() => factory.Create(page.User.Claims.First(claim => claim.Type == ClaimTypes.NameIdentifier).Value));