Magazine Service

This service is used to handle magazine related data, such as article content.

Calling the Service from .NET

C# Service Access Example using CODE Framework

Using CODE Framework service call infrastructure, this service can be called from the client like so:

ServiceClient.Call<IMagazineService>(s => {
    var response = s.GetMagazines(new PublicationInformationRequest());
});

NuGet Packages

To use this service from .NET Core applications, add appropriate packages from the private EPSPackages repository (https://dev.azure.com/eps-software/EPSPackages). The following packages are available.

Note: In most cases you will only need the EPS.Thessaly.MagazineService.Contract package!!! Do not add unnecessary package references!

Package Purpose
EPS.Thessaly.MagazineService.ArticleProcessing Special festures for handling magazine content, such as importing articles.
EPS.Thessaly.MagazineService.Contract Provides all contracts needed to access the service (usually through CODE Framework).
EPS.Thessaly.MagazineService.Implementation Full service implementation for in-process hosting.
EPS.Thessaly.MagazineService.BusinessObjects Lower-level business object implementation used by the service implementation.

.NET Configuration

When using these services through CODE Framework's ServiceClient class the following configuration settings need to be added. This can be done through an XML configuration file, or a JSON file, or any other mechanism CODE Framework's configuration system supports. For ASP.NET Core applications, the following settings need to appear in appsettings.json:

"ApplicationSettings": {
  "ServiceProtocol": "REST",
  "RestServiceUrl": {
    "IMagazineService": "https://epsservices-magazine.azurewebsites.net"
  }
}

For XML configurations (such as in web.config or app.config:

<add key="ServiceProtocol" value="REST"/>
<add key="RestServiceUrl:IMagazineService" value="https://epsservices-magazine.azurewebsites.net" />

It is also possible to simply set these settings in code before you make a call (usually during app startup) like so:

ConfigurationSettings.Sources["Memory"].Settings["ServiceProtocol"] = "REST";
ConfigurationSettings.Sources["Memory"].Settings["RestServiceUrl:IMagazineService"] = "https://epsservices-magazine.azurewebsites.net";

For more information on .NET Core service calling, see also: Calling Services in .NET Core.

Solution

Part of the EPSServices_Magazine solution in EPS Internal Apps on Azure DevOps: https://dev.azure.com/eps-software/EPS%20Internal%20Applications/_git/EPSServices_Magazine