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); }
public List <Transaction> GetAllTransaction() { return(_transRepository.GetAllTransaction()); }