Add project files.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using ConstructorApp.DataAccessLayer.Abstract;
|
||||
using ConstructorApp.DataAccessLayer.Concrete;
|
||||
using ConstructorApp.DataAccessLayer.Repositories;
|
||||
using ConstructorApp.EntityLayer.Entities;
|
||||
|
||||
namespace ConstructorApp.DataAccessLayer.EntityFramework
|
||||
{
|
||||
public class EfWorkProcessDal : GenericRepository<WorkProcess>, IWorkProcessDal
|
||||
{
|
||||
private readonly ConstructorContext context;
|
||||
public EfWorkProcessDal(ConstructorContext context) : base(context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void ServiceStatusActive(int id)
|
||||
{
|
||||
var values = context.WorkProcess.Find(id);
|
||||
values.IsActive = true;
|
||||
context.SaveChanges();
|
||||
}
|
||||
|
||||
public void ServiceStatusPassive(int id)
|
||||
{
|
||||
var values = context.WorkProcess.Find(id);
|
||||
values.IsActive = false;
|
||||
context.SaveChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user