private bool HasTypeOverride(AttributeModel attribute) { var overrideAttributeStereotype = attribute.GetStereotype("EFMappingOptions"); if (overrideAttributeStereotype != null) { var columnType = overrideAttributeStereotype.GetProperty <string>("ColumnType"); if (!string.IsNullOrEmpty(columnType)) { return(true); } } var overrideTypeStereotype = attribute.Type.Element.GetStereotype("EFMappingOptions"); if (overrideTypeStereotype != null) { var columnType = overrideTypeStereotype.GetProperty <string>("ColumnType"); if (!string.IsNullOrEmpty(columnType)) { return(true); } } return(false); }
public static TextConstraints GetTextConstraints(this AttributeModel model) { var stereotype = model.GetStereotype("Text Constraints"); return(stereotype != null ? new TextConstraints(stereotype) : null); }
public static PrimaryKey GetPrimaryKey(this AttributeModel model) { var stereotype = model.GetStereotype("Primary Key"); return(stereotype != null ? new PrimaryKey(stereotype) : null); }
public static Index GetIndex(this AttributeModel model) { var stereotype = model.GetStereotype("Index"); return(stereotype != null ? new Index(stereotype) : null); }
public static DefaultConstraint GetDefaultConstraint(this AttributeModel model) { var stereotype = model.GetStereotype("Default Constraint"); return(stereotype != null ? new DefaultConstraint(stereotype) : null); }
public static DecimalConstraints GetDecimalConstraints(this AttributeModel model) { var stereotype = model.GetStereotype("Decimal Constraints"); return(stereotype != null ? new DecimalConstraints(stereotype) : null); }