Nackup / Restore of total DB is working

This commit is contained in:
2021-03-19 00:02:59 +01:00
parent 154f8cc07a
commit f8c04d93e2
7 changed files with 86 additions and 22 deletions

View File

@ -17,7 +17,7 @@ namespace StockDAL
var entity = (from brr in context.BackupRegings
where brr.Id == backupRegister.Id
select brr).FirstOrDefault();
if(entity == null)
if (entity == null)
{
entity = new BackupRegister
{
@ -40,6 +40,17 @@ namespace StockDAL
return entity;
}
public BackupRegister GetBackupRegisterById(int brId)
{
using var context = new StockContext();
var entity = (from br in context.BackupRegings
where br.Id == brId
select br).FirstOrDefault();
return entity;
}
public IEnumerable<BackupRegister> GetAllBackupRegisters()
{
using var context = new StockContext();