public ViewFoodAnimalTotal(AnimalFood animalFood)
 {
     Id            = animalFood.Id;
     AnimalName    = animalFood.Animal.Name;
     TotalQuantity = animalFood.Quantity * animalFood.Animal.Quantity;
     TotalPrice    = animalFood.Quantity * animalFood.Animal.Quantity * animalFood.Food.Price;
 }
Example #2
0
 public ViewFoodTotal(AnimalFood animalFood)
 {
     FoodName      = animalFood.Food.Name;
     FoodPrice     = animalFood.Food.Price;
     TotalQuantity = animalFood.Animal.Quantity * animalFood.Quantity;
     TotalPrice    = animalFood.Food.Price * TotalQuantity;
     Id            = animalFood.Id;
     FoodId        = animalFood.FoodId;
 }