first edit
This commit is contained in:
49
XLIMS.SERVICES/LimsService.cs
Normal file
49
XLIMS.SERVICES/LimsService.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Threading.Tasks;
|
||||
using XLIMS.CONTRACT;
|
||||
using XLIMS.DATA.Models;
|
||||
|
||||
namespace XLIMS.SERVICES
|
||||
{
|
||||
public class LimsService : ILimsService
|
||||
{
|
||||
private readonly LimsdbContext _context;
|
||||
|
||||
public IGenericRepository<BookSet> Books { get; private set; }
|
||||
public IGenericRepository<DataSet> Datas { get; private set; }
|
||||
public IGenericRepository<DeviceSet> Devices { get; private set; }
|
||||
public IGenericRepository<DivisionSet> Divisions { get; private set; }
|
||||
public IGenericRepository<DocumentSet> Documents { get; private set; }
|
||||
public IGenericRepository<PersonalSet> Personals { get; private set; }
|
||||
public IGenericRepository<Spnmtp> Spnmtps { get; private set; }
|
||||
public IGenericRepository<Spoi> Spois { get; private set; }
|
||||
public IGenericRepository<Tip> Tips { get; private set; }
|
||||
public IGenericRepository<Tprz> Tprzs { get; private set; }
|
||||
|
||||
public LimsService(LimsdbContext context)
|
||||
{
|
||||
_context = context;
|
||||
|
||||
Books = new GenericRepository<BookSet>(_context);
|
||||
Datas = new GenericRepository<DataSet>(_context);
|
||||
Devices = new GenericRepository<DeviceSet>(_context);
|
||||
Divisions = new GenericRepository<DivisionSet>(_context);
|
||||
Documents = new GenericRepository<DocumentSet>(_context);
|
||||
Personals = new GenericRepository<PersonalSet>(_context);
|
||||
Spnmtps = new GenericRepository<Spnmtp>(_context);
|
||||
Spois = new GenericRepository<Spoi>(_context);
|
||||
Tips = new GenericRepository<Tip>(_context);
|
||||
Tprzs = new GenericRepository<Tprz>(_context);
|
||||
}
|
||||
|
||||
public async Task<int> SaveChangesAsync()
|
||||
{
|
||||
return await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public int SaveChanges()
|
||||
{
|
||||
return _context.SaveChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user