Comments (9)
[SugarColumn(IsNullable = true, ColumnDataType = "float")]
public TimeSpan? SoGio { get; set; }
Change to
[SugarColumn(IsNullable = true, ColumnDataType = "time")]
public TimeSpan? SoGio { get; set; }
from sqlsugar.
Change the database, too
from sqlsugar.
This is parameterized, should not report errors, you see if the system is adjusted
from sqlsugar.
Maybe the data type is wrong
from sqlsugar.
You can test this with a 2-field table
from sqlsugar.
I try CreateTime and NgayTao
You can see in picture
If no insert NgayTao => success true
from sqlsugar.
NgayTao dataType DateTime
CreateTime same DataType
The first i see this bug
from sqlsugar.
`[SugarTable("CC_DangKy")]
public class CC_DangKy_Entity
{
[SugarColumn(IsPrimaryKey = true, IsNullable = false)]
public long Id { get; set; }
[SugarColumn(IsNullable = false)]
public int? NamThang { get; set; }
public DateTime? Ngay { get; set; }
[SugarColumn(IsNullable = false)]
public long? EmployeeId { get; set; }
[SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
public string? Ca1 { get; set; }
[SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
public string? Ca2 { get; set; }
[SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
public string? Ca3 { get; set; }
[SugarColumn(IsNullable = true)]
public int? VanPhong { get; set; }
[SugarColumn(IsNullable = true, ColumnDataType = "nvarchar(500)")]
public string? CungDuong { get; set; }
[SugarColumn(IsNullable = true, ColumnDataType = "varchar(20)")]
public string? LoaiPhep { get; set; }
[SugarColumn(IsNullable = true, ColumnDataType = "nvarchar(500)")]
public string? LyDo { get; set; }
/// <summary>
/// Nghỉ từ giờ
/// </summary>
[SugarColumn(IsNullable = true, ColumnDataType = "Time")]
public TimeSpan? TuGio { get; set; }
/// <summary>
/// Nghỉ đến giờ
/// </summary>
[SugarColumn(IsNullable = true, ColumnDataType = "Time")]
public TimeSpan? DenGio { get; set; }
/// <summary>
/// Số giờ nghỉ
/// </summary>
[SugarColumn(IsNullable = true, ColumnDataType = "float")]
public TimeSpan? SoGio { get; set; }
[SugarColumn(IsNullable = true,ColumnDataType ="datetime")]
public DateTime NgayTao { get; set; }
[SugarColumn(ColumnDataType = "tinyint")]
public int? TrangThai { get; set; }
/// <summary>
/// Id người duyệt
/// </summary>
public long? NguoiDuyet1 { get; set; }
[SugarColumn(IsIgnore = true)]
[Navigate(NavigateType.OneToOne, nameof(NguoiDuyet1))]
public SysAccountInfoEntity? AccNguoiDuyet1 { get; set; }
public DateTime? Duyet1Ngay { get; set; }
public long? NguoiDuyet2 { get; set; }
[SugarColumn(IsIgnore = true)]
[Navigate(NavigateType.OneToOne, nameof(Duyet2Ngay))]
public SysAccountInfoEntity? AccNguoiDuyet2 { get; set; }
public DateTime? Duyet2Ngay { get; set; }
[SugarColumn(IsNullable = true, ColumnDataType = "nvarchar(500)")]
public string PhanHoi { get; set; }
[SugarColumn(IsNullable = true)]
public DateTime CreateTime { get; set; }
}`
This class Entity
from sqlsugar.
oh, it's worked :))
many thank bro!
from sqlsugar.
Related Issues (20)
- The most industrious open-source project globally, resolving issues at the fastest pace.
- 查询和增删改查方面的改进 HOT 6
- sqlsugarcore is missing NuGet package README file
- sqlsugar is missing NuGet package README file
- sqlsugar.ioc is missing NuGet package README file
- linux sqlserver 08 下关联查询返回匿名类型时慢 HOT 9
- 能否给分表也加个软删除的方法 HOT 3
- 能否在分表查询再做一次优化? HOT 2
- 导航 到的表是分表 ,能不能在查询的时候 让我自定义分表 HOT 1
- sql does not interrupt execution HOT 3
- 使用 ExecuteReturnBigIdentityAsync 保存数据报 Object cannot be cast from DBNull to other types. HOT 1
- 使用sqlsugar调用 Kdbndp 带 数组参数的 存储过程 HOT 3
- PostgreSql Insertable 一串 List 的时候, 9999-12-31 23:59:59.999999 会变成 “ HOT 4
- PostgreSql Insertable 一串 List 的时候, 9999-12-31 23:59:59.999999 会变成 "10000-01-01 00:00:00" HOT 5
- [SplitTable] No gen Sql query when use SplitTable(dateBegin,dateEnd)
- Issue Running Simple MAUI App Android HOT 4
- 操作数类型冲突: uniqueidentifier 与 bigint 不兼容 HOT 11
- 在调用 Db.CodeFirst.InitTables(@"xxx.xxx.models"); 显示System.IO.FileNotFoundException: Could not load file or assembly HOT 3
- 有增加国产数据库yashandb的计划吗 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlsugar.