Skip to content

ColumnAttribute能否增加一个Write属性? #99

Closed
@fishjimi

Description

@fishjimi

参考Dapper.Contrib
可以为某列属性指定是否可写
当Write=false的时候,代表只可查,不可插入或更新
这样某些类似createtime updatetime这种在数据库自动填充的字段就不会被覆盖了。
免去了在代码里要指定IgnoreColumns的麻烦

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions