mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Add Demo
This commit is contained in:
parent
752518ed95
commit
9dad12d7db
@ -52,9 +52,23 @@ namespace OrmTest
|
|||||||
Console.Write(db.Queryable<BoolTest5>().First(it=>it.Id==Id).A);
|
Console.Write(db.Queryable<BoolTest5>().First(it=>it.Id==Id).A);
|
||||||
//db.Updateable<BoolTest4>(new BoolTest4() { dateTime = DateTime.Now,A = false, Id = Id }).ExecuteCommand();
|
//db.Updateable<BoolTest4>(new BoolTest4() { dateTime = DateTime.Now,A = false, Id = Id }).ExecuteCommand();
|
||||||
db.Updateable<BoolTest5>( new BoolTest5() { dateTime = DateTime.Now, A = false, Id = Id }).ExecuteCommand();
|
db.Updateable<BoolTest5>( new BoolTest5() { dateTime = DateTime.Now, A = false, Id = Id }).ExecuteCommand();
|
||||||
|
db.CodeFirst.InitTables<UnitSiafayyy>();
|
||||||
|
var list=db.Queryable<UnitSiafayyy>().SampleBy(1, SampleByUnit.Minute)
|
||||||
|
.Select(it=>new {
|
||||||
|
Id=SqlFunc.AggregateMin(it.Id),
|
||||||
|
Count=SqlFunc.AggregateCount(it.Id)
|
||||||
|
})
|
||||||
|
.ToList();
|
||||||
Console.Write(db.Queryable<BoolTest5>().First(it => it.Id == Id).A);
|
Console.Write(db.Queryable<BoolTest5>().First(it => it.Id == Id).A);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public class UnitSiafayyy
|
||||||
|
{
|
||||||
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public long Id { get; set; }
|
||||||
|
[TimeDbSplitField(DateType.Day)]
|
||||||
|
public DateTime DateTime { get; set; }
|
||||||
|
}
|
||||||
public class GuidTest
|
public class GuidTest
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey = true)]
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
Loading…
Reference in New Issue
Block a user