mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 20:40:55 +00:00
asdfasfd
This commit is contained in:
1 parent
4fbc39ca77
commit
568f360548
95 files changed
+3901
-4443
No files matched your search
@@ -0,0 +1,28 @@
|
||||
using CartriX.Api.Interfaces;
|
||||
using CartriX.Shared.Classes;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CartriX.Api.Services
|
||||
{
|
||||
public class ManufacturerService : IManufacturerService
|
||||
{
|
||||
private readonly AppDbContext _context;
|
||||
public ManufacturerService(AppDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public async Task<List<string>> GetNameListAsync()
|
||||
{
|
||||
var request = await _context.Manufacturers.ToListAsync();
|
||||
|
||||
List<string> list = new List<string>();
|
||||
foreach (var model in request)
|
||||
{
|
||||
list.Add(model.name);
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user