using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LinqSqlEpisodeIVProVid
{
    public partial class Order
    {
        partial void OnValidate(System.Data.Linq.ChangeAction action)
        {
            if (RequiredDate < OrderDate)
            {
                throw new ArgumentException("Required Date can't be smaller than Order Date");
            }
        }
    }
}
