• Home
  • Tutorials
  • API
  • Change Log
  • Github

    Show / Hide Table of Contents
    • Home
    • Attributes
    • Generating SQL
      • Object To Sql
      • DataTable To Sql
      • Readable Sql

    Custom Attributes

    In the secnarios where you need to build Update,Delete, or Upsert Statements. Attributes are use to generate the where clause. This library has its own custom attributes and can also work with the common DataAnnotation attributes. With the support of DataAnnotation this means this library could be paired with your favorite orm like Dapper or Enitity Framework

    Mark a property as an identity fields.
    [SqlColumn(SetIsIdentityKey = true)]
    OR 
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)] // using data annotation
    
    Mark a property as a key field.
    [SqlColumn(SetIsIdentityKey = true)]
    OR 
    [Key] // using data annotation
    
    Mark a property as a Json, Xml, Or Csv Field.
    [SqlColumn(SerializableType = SerializableType.Json)]
    
    Mark a property to be ignored .
    [SqlColumn(Ignore = true)]
    OR 
    [NotMapped] // using data annotation
    
    • Improve this Doc
    Back to top Copyright © 2019 Joseph McNeal Jr