Files
Backend-Api/CompanyManagment.EFCore/Repository/RollCallEmployeeStatusRepository.cs
2024-08-29 15:00:22 +03:30

30 lines
842 B
C#

using _0_Framework.Application;
using _0_Framework.InfraStructure;
using Company.Domain.RollCallEmployeeStatusAgg;
using CompanyManagment.App.Contracts.RollCallEmployeeStatus;
using System.Collections.Generic;
using System.Linq;
namespace CompanyManagment.EFCore.Repository
{
public class RollCallEmployeeStatusRepository : RepositoryBase<long, RollCallEmployeeStatus>, IRollCallEmployeeStatusRepository
{
private readonly CompanyContext _context;
public RollCallEmployeeStatusRepository(CompanyContext context) : base(context)
{
_context = context;
}
public List<RollCallEmployeeStatusViewModel> GetAll()
{
return _context.RollCallEmployeesStatus.Select(x => new RollCallEmployeeStatusViewModel()
{
StartDate = x.StartDate.ToFarsi(),
EndDate = x.EndDate.ToFarsi(),
Id = x.id
}).ToList();
}
}
}