暂无描述

LigneCommandeRepository.cs 927B

12345678910111213141516171819202122232425
  1. 
  2. using Backend.ApplicationCore.Interfaces.IRepositories;
  3. using Backend.Domain.Entities;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. namespace Backend.Infrastructure.Repositories
  8. {
  9. public class LigneCommandeRepository : GenericRepository<LigneCommande>, ILigneCommandeRepository
  10. {
  11. public LigneCommandeRepository(IApplicationDatabaseContext context) : base(context)
  12. {
  13. }
  14. public List<LigneCommande> GetLigneCommandesOfDate(DateTime dateTimeRef)
  15. {
  16. var ligneCommandes = (from lc in _context.LigneCommandes
  17. join cmd in _context.Commandes on lc.CommandeId equals cmd.Id
  18. where cmd.DateEnregistrement.Date.Equals(dateTimeRef.Date)
  19. select lc).OrderByDescending(e => e.Prix).ToList();
  20. return ligneCommandes;
  21. }
  22. }
  23. }

Powered by TurnKey Linux.