コード例 #1
0
 partial void OrderDetails_Updated(OrderDetail entity)
 {
     OnProductStatusAffected(entity.Product);
 }
コード例 #2
0
 partial void OrderDetails_Validate(OrderDetail entity, EntitySetValidationResultsBuilder results)
 {
     if (entity.DateOrderShipped != null & entity.Order.OrderDate != null)
     {
         if (entity.DateOrderShipped < entity.Order.OrderDate)
         {
             results.AddEntityError("The order cannot be shipped before it is placed");
         }
     }
 }