initial commit

This commit is contained in:
2026-04-15 15:02:32 +02:00
commit 3bfc79e6d9
1380 changed files with 69684 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
using Microsoft.SelfService.Portal.Core.API.Context;
using Microsoft.SelfService.Portal.Core.API.Interfaces;
using Microsoft.SelfService.Portal.Core.API.Models;
namespace Microsoft.SelfService.Portal.Core.API.Repository
{
public class TemplateRepository : ITemplateInterface
{
private readonly DataContext _context;
public TemplateRepository(DataContext context)
{
_context = context;
}
public ICollection<TemplateModel> GetTemplates()
{
return _context.Templates
.ToList();
}
public TemplateModel GetTemplateById(Guid Id)
{
return _context.Templates
.Where(t => t.Id == Id)
.FirstOrDefault();
}
public bool CheckTemplateById(Guid Id)
{
return _context.Templates
.Any(t => t.Id == Id);
}
}
}