I suggest you ...

In ModelMetada class in mvc2, if property is returning IEnumerable then there is no need to check for null.

public virtual IEnumerable<ModelMetadata> Properties {
get {
if (_properties == null) {
_properties = Provider.GetMetadataForProperties(Model, RealModelType);
}
return _properties;
}
}

8 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    ChintanChintan shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base