using PMSWPF.Data.Entities; namespace PMSWPF.Data.Repositories; public class DevicesRepositories:BaseRepositories { public DevicesRepositories() { } public async Task Add(DbDevice dbDevice) { return await _db.Insertable(dbDevice).ExecuteCommandAsync(); } public async Task> GetAll() { return await _db.Queryable().ToListAsync(); } public async Task GetById(int id) { return await _db.Queryable().FirstAsync(p=>p.Id == id); } public async Task DeleteById(int id) { return await _db.Deleteable(new DbDevice() { Id = id }).ExecuteCommandAsync(); } }