SES-152 Endpoint zwracający sklepikarzy #79
@ -0,0 +1,19 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using SessionCompanion.Database.Tables;
|
||||||
|
using SessionCompanion.ViewModels.ShopkeeperItemsViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SessionCompanion.Services.Profiles
|
||||||
|
{
|
||||||
|
public class ShopkeeperItemsProfile : Profile
|
||||||
|
{
|
||||||
|
public ShopkeeperItemsProfile()
|
||||||
|
{
|
||||||
|
CreateMap<ShopkeeperItemViewModel, ShopkeeperItem>().ReverseMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using SessionCompanion.Database.Tables;
|
||||||
|
using SessionCompanion.ViewModels.ShopkeeperViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SessionCompanion.Services.Profiles
|
||||||
|
{
|
||||||
|
public class ShopkeeperProfile : Profile
|
||||||
|
{
|
||||||
|
public ShopkeeperProfile()
|
||||||
|
{
|
||||||
|
CreateMap<ShopkeeperViewModel, Shopkeeper>().ReverseMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using SessionCompanion.Database.Repositories.Base;
|
||||||
|
using SessionCompanion.Database.Tables;
|
||||||
|
using SessionCompanion.Services.Base;
|
||||||
|
using SessionCompanion.Services.Interfaces;
|
||||||
|
using SessionCompanion.ViewModels.ShopkeeperItemsViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SessionCompanion.Services.Services
|
||||||
|
{
|
||||||
|
public class ShopkeeperItemService : ServiceBase<ShopkeeperItemViewModel, ShopkeeperItem>, IShopkeeperItemService
|
||||||
|
{
|
||||||
|
public ShopkeeperItemService(IMapper mapper, IRepository<ShopkeeperItem> repository) : base(mapper, repository)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using SessionCompanion.Database.Repositories.Base;
|
||||||
|
using SessionCompanion.Database.Tables;
|
||||||
|
using SessionCompanion.Services.Base;
|
||||||
|
using SessionCompanion.Services.Interfaces;
|
||||||
|
using SessionCompanion.ViewModels.ShopkeeperViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SessionCompanion.Services.Services
|
||||||
|
{
|
||||||
|
public class ShopkeeperService : ServiceBase<ShopkeeperViewModel, Shopkeeper>, IShopkeeperService
|
||||||
|
{
|
||||||
|
public ShopkeeperService(IMapper mapper, IRepository<Shopkeeper> repository) : base(mapper, repository)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
@ -36,6 +36,8 @@ namespace SessionCompanion.Configurations
|
|||||||
services.AddScoped<IWeaponService, WeaponService>();
|
services.AddScoped<IWeaponService, WeaponService>();
|
||||||
services.AddScoped<ICharacterWeaponService, CharacterWeaponService>();
|
services.AddScoped<ICharacterWeaponService, CharacterWeaponService>();
|
||||||
services.AddScoped<IMonsterService, MonsterService>();
|
services.AddScoped<IMonsterService, MonsterService>();
|
||||||
|
services.AddScoped<IShopkeeperService, ShopkeeperService>();
|
||||||
|
services.AddScoped<IShopkeeperItemService, ShopkeeperItemService>();
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user