30 lines
842 B
C#
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();
|
|
|
|
}
|
|
}
|
|
}
|