Breeze.PocoMetadata.NorthwindEntityDescriptor.IsKeyProperty C# (CSharp) Method

IsKeyProperty() public method

public IsKeyProperty ( Type type, PropertyInfo propertyInfo ) : bool
type System.Type
propertyInfo System.Reflection.PropertyInfo
return bool
        public override bool IsKeyProperty(Type type, PropertyInfo propertyInfo)
        {
            var name = propertyInfo.Name;
            if (name == (type.Name + "ID")) return true;
            if (name.Equals("ID", StringComparison.OrdinalIgnoreCase)) return true;
            if (type.Name == "InternationalOrder")
            {
                if (name == "OrderID") return true;
            }
            if (type.Name == "OrderDetail")
            {
                if (name == "OrderID") return true;
                if (name == "ProductID") return true;
            }
            if (type.Name == "PreviousEmployee")
            {
                if (name == "EmployeeID") return true;
            }
            if (type.Name == "ProductDiscontinued")
            {
                if (name == "ProductID") return true;
            }
            if (type.Name == "Comment")
            {
                if (name == "CreatedOn") return true;
                if (name == "SeqNum") return true;
            }
            return false;
        }