Addet Employye get logic

This commit is contained in:
Alex Pedersen
2026-08-03 09:55:41 +02:00
parent 205d27c6c7
commit c1695b4967
8 changed files with 95 additions and 37 deletions

View File

@@ -1,10 +1,11 @@
using System;
using Database.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Database.Models;
using Microsoft.Extensions.Configuration;
namespace Database.Repository
{
@@ -58,5 +59,16 @@ namespace Database.Repository
public void Dispose()
{
}
public async Task<List<EmployeeEntity>> GetAllAsync()
{
await using PosDbContext context = new PosDbContext();
return await context.Employee
.AsNoTracking()
.Where(employee => !employee.IsArchived)
.OrderBy(employee => employee.Name)
.ToListAsync();
}
}
}