34 lines
980 B
C#
34 lines
980 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using gehGassi.Core.Interfaces;
|
|
using gehGassi.Domain.Shop;
|
|
|
|
namespace gehGassi.Core.Services
|
|
{
|
|
/// <summary>
|
|
/// Service der die Verwaltung Shop-Einstellungen realisiert
|
|
/// </summary>
|
|
public class ShopSettingsService : ServiceBase<ShopSettings>, IShopSettingsService
|
|
{
|
|
/// <summary>
|
|
/// Erstellt eine Instanz
|
|
/// </summary>
|
|
/// <param name="unitOfWork">Instanz einer IUnitOfWork</param>
|
|
public ShopSettingsService(IUnitOfWork unitOfWork) : base(unitOfWork)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gibt die aktuellen Shop-Einstellungen zurück
|
|
/// </summary>
|
|
/// <returns>ShopSettings</returns>
|
|
public async Task<ShopSettings> GetAsync()
|
|
{
|
|
return await Repository.FirstOrDefaultAsync( c => c.Id > 0).ConfigureAwait(false);
|
|
}
|
|
}
|
|
}
|