Files
2025-05-01 15:18:30 +03:00

31 lines
904 B
C#

using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfServiceDal : GenericRepository<Service>, IServiceDal
{
private readonly ConstructorContext context;
public EfServiceDal(ConstructorContext context) : base(context)
{
this.context = context;
}
public void ServiceStatusActive(int id)
{
var values = context.Services.Find(id);
values.IsActive = true;
context.SaveChanges();
}
public void ServiceStatusPassive(int id)
{
var values = context.Services.Find(id);
values.IsActive = false;
context.SaveChanges();
}
}
}