first commit

This commit is contained in:
Yaël Perret
2026-04-02 19:19:12 +02:00
commit b4e977948b
60 changed files with 1946 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore;
using ServiceManager.API.Models;
namespace ServiceManager.API.Services
{
public interface IArticlesService
{
Task<IEnumerable<Article>> GetArticlesAsync();
}
public class ArticlesService : IArticlesService
{
private readonly AppDbContext _context;
public ArticlesService(AppDbContext context)
{
_context = context;
}
public async Task<IEnumerable<Article>> GetArticlesAsync()
{
return await _context.Articles.ToListAsync();
}
}
}