Defining the application layer
The application layer contains the definition of all business operations. These business operations use data provided by the user to modify domain layer abstraction aggregates, such as touristic packages. When all business operations involved in the current user request have been performed, an IUnitOfWork.SaveEntitiesAsync()
operation is performed to save all changes to the database.
As a first step, for simplicity, let’s freeze the application culture to en-US
by adding the following code to the ASP.NET Core pipeline:
app.UseAuthorization();
// Code to add: configure the Localization middleware
var ci = new CultureInfo("en-US");
app.UseRequestLocalization(new RequestLocalizationOptions
{
DefaultRequestCulture = new RequestCulture(ci),
SupportedCultures = new List<CultureInfo>
{
ci,
},
SupportedUICultures = new List<CultureInfo>
{
ci,
}
});
As a second step, we can...