public ViewFoodAnimalTotal(AnimalFood animalFood)
 {
     Id = animalFood.Id;
     AnimalName = animalFood.Animal.Name;
     TotalQuantity = animalFood.Quantity*animalFood.Animal.Quantity;
     TotalPrice = TotalQuantity*animalFood.Food.Price;
 }
Ejemplo n.º 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;
 }
 public ViewFoodTotal(AnimalFood animalFood)
 {
     FoodName = animalFood.Food.Name; // grass
     FoodPrice = animalFood.Food.Price; // 10
     TotalQuantity = animalFood.Animal.Quantity*animalFood.Quantity;// 3 * 3 = 9
     TotalPrice = FoodPrice * TotalQuantity;
     Id = animalFood.Id;
     FoodId = animalFood.FoodId;
 }