mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 12:09:29 +08:00
float? BUG
This commit is contained in:
@@ -41,27 +41,43 @@ namespace OrmTest.BugTest
|
||||
SqlFunc.Contains(u.HousePlace, keyword) || SqlFunc.Contains(u.UnitName, keyword) ||
|
||||
SqlFunc.Contains(u.BuildName, keyword) || SqlFunc.IsNullOrEmpty(keyword)))
|
||||
.GroupBy(ru => new { ru.RoomNumber, ru.RoomID })
|
||||
.Select(ru => new
|
||||
.Select(ru => new
|
||||
{
|
||||
RoomNumber = SqlFunc.AggregateMax(ru.RoomNumber),
|
||||
CountRoomer = SqlFunc.AggregateCount(ru.RoomerName),
|
||||
RoomID = SqlFunc.AggregateMax(ru.RoomID),
|
||||
Owner = SqlFunc.Subqueryable<SubTable>().Where(r => r.RoomID == ru.RoomID && SqlFunc.Equals(r.RoomUserType, "业主") && SqlFunc.Equals(r.RoomUserType, "业主")).Select(s => s.RoomerName)
|
||||
RoomNumber = SqlFunc.AggregateMax(ru.RoomNumber),
|
||||
CountRoomer = SqlFunc.AggregateCount(ru.RoomerName),
|
||||
RoomID = SqlFunc.AggregateMax(ru.RoomID),
|
||||
Owner = SqlFunc.Subqueryable<SubTable>().Where(r => r.RoomID == ru.RoomID && SqlFunc.Equals(r.RoomUserType, "业主") && SqlFunc.Equals(r.RoomUserType, "业主")).Select(s => s.RoomerName)
|
||||
}).OrderBy((r) => r.RoomNumber, type: OrderByType.Desc).ToPageListAsync(1, 2).Wait();
|
||||
|
||||
GetInstance().Updateable<Student>().UpdateColumns(it =>
|
||||
new Student() {
|
||||
new Student()
|
||||
{
|
||||
Name = "a".ToString(),
|
||||
CreateTime=DateTime.Now.AddDays(-1)
|
||||
CreateTime = DateTime.Now.AddDays(-1)
|
||||
|
||||
}
|
||||
).Where(it=>it.Id==1).ExecuteCommand();
|
||||
).Where(it => it.Id == 1).ExecuteCommand();
|
||||
|
||||
|
||||
var list = GetInstance().Queryable<Student, School>((st, sc) => new object[] {
|
||||
JoinType.Left,st.SchoolId==sc.Id&&st.CreateTime==DateTime.Now.AddDays(-1)
|
||||
})
|
||||
.Where(st => st.Name == "jack").ToList();
|
||||
|
||||
|
||||
GetInstance().Updateable<BugStudent>().Where(it => true).UpdateColumns(it => new BugStudent() { Float = 11 }).ExecuteCommand();
|
||||
var reslut= GetInstance().Queryable<BugStudent>().ToList();
|
||||
}
|
||||
|
||||
|
||||
[SugarTable("student")]
|
||||
public class BugStudent
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
public string name { get; set; }
|
||||
public float? Float { get; set; }
|
||||
|
||||
}
|
||||
public class MainTable
|
||||
{
|
||||
|
Reference in New Issue
Block a user