added repositories

This commit is contained in:
Kosma 2020-12-05 11:33:34 +01:00
parent 501738f247
commit 553232acf7
8 changed files with 91 additions and 1 deletions

View File

@ -0,0 +1,14 @@
using SessionCompanion.Database.Repositories.Base;
using SessionCompanion.Database.Tables;
using System;
using System.Collections.Generic;
using System.Text;
namespace SessionCompanion.Database.Repositories
{
public class CharismaRepository : Repository<Charisma>, IRepository<Charisma>
{
public CharismaRepository(ApplicationDbContext _dbContext) : base(_dbContext)
{ }
}
}

View File

@ -0,0 +1,14 @@
using SessionCompanion.Database.Repositories.Base;
using SessionCompanion.Database.Tables;
using System;
using System.Collections.Generic;
using System.Text;
namespace SessionCompanion.Database.Repositories
{
public class ConstitutionRepository : Repository<Constitution>, IRepository<Constitution>
{
public ConstitutionRepository(ApplicationDbContext _dbContext) : base(_dbContext)
{ }
}
}

View File

@ -0,0 +1,14 @@
using SessionCompanion.Database.Repositories.Base;
using SessionCompanion.Database.Tables;
using System;
using System.Collections.Generic;
using System.Text;
namespace SessionCompanion.Database.Repositories
{
public class DexterityRepository : Repository<Dexterity>, IRepository<Dexterity>
{
public DexterityRepository(ApplicationDbContext _dbContext) : base(_dbContext)
{ }
}
}

View File

@ -0,0 +1,14 @@
using SessionCompanion.Database.Repositories.Base;
using SessionCompanion.Database.Tables;
using System;
using System.Collections.Generic;
using System.Text;
namespace SessionCompanion.Database.Repositories
{
public class IntelligenceRepository : Repository<Intelligence>, IRepository<Intelligence>
{
public IntelligenceRepository(ApplicationDbContext _dbContext) : base(_dbContext)
{ }
}
}

View File

@ -0,0 +1,14 @@
using SessionCompanion.Database.Repositories.Base;
using SessionCompanion.Database.Tables;
using System;
using System.Collections.Generic;
using System.Text;
namespace SessionCompanion.Database.Repositories
{
public class StrengthRepository : Repository<Strength>, IRepository<Strength>
{
public StrengthRepository(ApplicationDbContext _dbContext) : base(_dbContext)
{ }
}
}

View File

@ -0,0 +1,14 @@
using SessionCompanion.Database.Repositories.Base;
using SessionCompanion.Database.Tables;
using System;
using System.Collections.Generic;
using System.Text;
namespace SessionCompanion.Database.Repositories
{
public class WisdomRepository : Repository<Wisdom>, IRepository<Wisdom>
{
public WisdomRepository(ApplicationDbContext _dbContext) : base(_dbContext)
{ }
}
}

View File

@ -58,4 +58,4 @@
"ts-node": "~8.4.1",
"tslint": "~5.20.0"
}
}
}

View File

@ -17,10 +17,16 @@ namespace SessionCompanion.Configurations
services.AddScoped<IRepository<Background>, BackgroundRepository>();
services.AddScoped<IRepository<Biography>, BiographyRepository>();
services.AddScoped<IRepository<Character>, CharacterRepository>();
services.AddScoped<IRepository<Charisma>, CharismaRepository>();
services.AddScoped<IRepository<Class>, ClassRepository>();
services.AddScoped<IRepository<Constitution>, ConstitutionRepository>();
services.AddScoped<IRepository<Dexterity>, DexterityRepository>();
services.AddScoped<IRepository<Intelligence>, IntelligenceRepository>();
services.AddScoped<IRepository<Race>, RaceRepository>();
services.AddScoped<IRepository<Statistics>, StatisticsRepository>();
services.AddScoped<IRepository<Strength>, StrengthRepository>();
services.AddScoped<IRepository<User>, UserRepository>();
services.AddScoped<IRepository<Wisdom>, WisdomRepository>();
return services;
}