Giter Site home page Giter Site logo

Comments (9)

DotNetNext avatar DotNetNext commented on May 11, 2024 1

[SugarColumn(IsNullable = true, ColumnDataType = "float")]
public TimeSpan? SoGio { get; set; }

Change to

[SugarColumn(IsNullable = true, ColumnDataType = "time")]
public TimeSpan? SoGio { get; set; }

from sqlsugar.

DotNetNext avatar DotNetNext commented on May 11, 2024 1

Change the database, too

from sqlsugar.

DotNetNext avatar DotNetNext commented on May 11, 2024

This is parameterized, should not report errors, you see if the system is adjusted

from sqlsugar.

DotNetNext avatar DotNetNext commented on May 11, 2024

Maybe the data type is wrong

from sqlsugar.

DotNetNext avatar DotNetNext commented on May 11, 2024

You can test this with a 2-field table

from sqlsugar.

mrreddevil2412 avatar mrreddevil2412 commented on May 11, 2024

I try CreateTime and NgayTao
You can see in picture
If no insert NgayTao => success true

from sqlsugar.

mrreddevil2412 avatar mrreddevil2412 commented on May 11, 2024

NgayTao dataType DateTime
CreateTime same DataType

The first i see this bug

from sqlsugar.

mrreddevil2412 avatar mrreddevil2412 commented on May 11, 2024

`[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.

mrreddevil2412 avatar mrreddevil2412 commented on May 11, 2024

oh, it's worked :))
many thank bro!

from sqlsugar.

Related Issues (20)

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.