Giter Site home page Giter Site logo

pococlassgenerator's Issues

資料行 'IsAutoIncrement' 不屬於資料表 SchemaTable。

HI

請問我新增PocoClassGenerator 這個CS檔,但是實際實行後出現錯誤訊息:[資料行 'IsAutoIncrement' 不屬於資料表 SchemaTable。]

經查詢為 generatorBehavior.HasFlag(GeneratorBehavior.Comment) 與 generatorBehavior.HasFlag(GeneratorBehavior.DapperContrib)
不一致導致 在 (bool)row["IsAutoIncrement"] 找不到元素。然後引發錯誤,請問該如何處理?

DB:oracle

Support Dapper FK POCO

e.g

    [Table("Report")]
    public class Report
    {
        [Key]
        public string Id { get; set; }
        public string Name { get; set; }
        public string Type { get; set; }
        public string Sql { get; set; }
        public string Updatetime { get; set; }
        public string ReportDataBaseId { get; set; }

        public ReportDataBase ReportDataBase { get; set; }
    }

    [Table("ReportDataBase")]
    public class ReportDataBase
    {
        [Key]
        public string Id { get; set; }
        public string Name { get; set; }
        public string DbType { get; set; }
        public string ConnectionString { get; set; }
    }

Query by

	var sql = "SELECT * FROM Report A left JOIN ReportDataBase B on A.ReportDataBaseId = B.ID";
	var result = Connection.Query<Report, ReportDataBase, Report>(sql,
	(b, a) => { b.ReportDataBase = a; return b; });

support Dapper.Contrib

public class Employee
{
    [Key]
    public int EmployeeId { get; set; }
    public string Name { get; set; }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.