16 lines
389 B
C#
16 lines
389 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using OdooAPI.Database;
|
|
|
|
public class ArtikelRepository
|
|
{
|
|
public async Task<List<string>> GetSupplierNamesAsync(int artikelId)
|
|
{
|
|
using var db = new AppDbContext();
|
|
|
|
return await db.LevArtikelen
|
|
.Where(x => x.ArtikelId == artikelId)
|
|
.Select(x => x.Leverancier.Naam)
|
|
.ToListAsync();
|
|
}
|
|
}
|