DbExtensions.Node.AllColumnsNull(System.Data.IDataRecord)

Here are the examples of the csharp api class DbExtensions.Node.AllColumnsNull(System.Data.IDataRecord) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: DbExtensions
Source File: Mapper.cs
protected virtual object MapComplex(IDataRecord record, MappingContext context) {

         if (AllColumnsNull(record)) {
            return null;
         }

         object value = Create(record, context);
         Load(ref value, record, context);

         return value;
      }

2. Example

Project: DbExtensions
Source File: Mapper.cs
bool AllColumnsNull(IDataRecord record) {

         if (this.IsComplex) {

            return (!this.HasConstructorParameters
                  || this.ConstructorParameters
                     .OrderBy(n => n.Value.IsComplex)
                     .All(n => n.Value.AllColumnsNull(record)))
               && this.Properties
                  .OrderBy(n => n.IsComplex)
                  .All(n => n.AllColumnsNull(record));
         }

         return record.IsDBNull(this.ColumnOrdinal);
      }