예제 #1
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 internal PropertyMapping(EntityMapping entityMapping, PropertyDescriptor descriptor)
 {
     _options            = PropertyMappingOptions.None;
     _databaseColumnName = descriptor.Name;
     this.EntityMapping  = entityMapping;
     this.Descriptor     = descriptor;
 }
예제 #2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 internal PropertyMapping(EntityMapping entityMapping, int order, PropertyDescriptor descriptor)
 {
     _order = order;
     _options = PropertyMappingOptions.None;
     _databaseColumnName = descriptor.Name;
     this.EntityMapping = entityMapping;
     this.Descriptor = descriptor;
 }
예제 #3
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public PropertyMapping(EntityMapping entityMapping, int order,  PropertyMappingOptions options, PropertyDescriptor descriptor, string databaseColumn = null)
 {
     _order = order;
     _entityMapping = entityMapping;
     _options = options;
     _databaseColumnName = databaseColumn??descriptor.Name;
     this.Descriptor = descriptor;
 }
예제 #4
0
 protected void SetPropertyInternal(string propertyName, PropertyMappingOptions options, string databaseColumnName)
 {
     var propDescriptor = TypeDescriptor.GetProperties(this.EntityType).OfType<PropertyDescriptor>().Single(propInfo => propInfo.Name == propertyName);
     this.SetPropertyInternal(propDescriptor, options, databaseColumnName);
 }
예제 #5
0
 protected void SetPropertyInternal(PropertyDescriptor property, PropertyMappingOptions options, string databaseColumnName)
 {
     this.PropertyMappings[property.Name] = new PropertyMapping(this, this.PropertyMappings.Count, options, property, databaseColumnName);
 }