CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla/DataPortalClient/DataPortalFactory.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="DataPortalFactory.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Implements a data portal service</summary>
7//-----------------------------------------------------------------------
8using System;
9
11{
17 {
22 public DataPortalFactory(IServiceProvider serviceProvider)
23 {
24 ServiceProvider = serviceProvider;
25 }
26
27 private IServiceProvider ServiceProvider { get; set; }
28
34 {
35 return (IDataPortal<T>)ServiceProvider.GetService(typeof(IDataPortal<T>));
36 }
37 }
38}
Get an access to a client-side data portal instance.
IDataPortal< T > GetPortal< T >()
Get a client-side data portal instance.
DataPortalFactory(IServiceProvider serviceProvider)
Creates an instance of the type.
Defines a data portal service used to get an access to a client-side data portal instance.
Interface defining the members of the data portal type.
Definition: IDataPortalT.cs:17