Exemple #1
0
        public IEnumerable <PetVm> GetSoldPets()
        {
            var pets = _petRepository.GetAllPets().Join(_transRepository.GetAllTransaction(), p => p.Id, t => t.PetId,
                                                        (p, t) => new PetVm
            {
                Id           = p.Id, DateOfBirth = p.DateOfBirth,
                InplanteDate = p.InplanteDate, SoldDate = t.CrietedDate,
                Price        = p.Price,
                PetType      = p.PetType, TransType = t.TransType
            }).ToList();

            return(pets);
        }
Exemple #2
0
 public List <Transaction> GetAllTransaction()
 {
     return(_transRepository.GetAllTransaction());
 }