mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Update demo
This commit is contained in:
parent
2bf31b6f43
commit
74d490f965
@ -45,8 +45,17 @@ namespace OrmTest
|
||||
{
|
||||
}
|
||||
db.CodeFirst.InitTables<UnitTableName>();
|
||||
|
||||
db.CodeFirst.InitTables<UnitGe>();
|
||||
db.Insertable(new UnitGe() { geometry1 = "POINT (20 180)" }).ExecuteCommand();
|
||||
var gelist=db.Queryable<UnitGe>().Select(it=>new { geometry1 = it.geometry1.ToString()}).ToList();
|
||||
}
|
||||
|
||||
public class UnitGe
|
||||
{
|
||||
[SugarColumn(ColumnDataType = "geometry")]
|
||||
public string geometry1 { get; set; }
|
||||
}
|
||||
|
||||
[SugarTable("abp.UnitTableName","备注")]
|
||||
public class UnitTableName
|
||||
{
|
||||
|
@ -84,7 +84,10 @@ namespace SqlSugar
|
||||
{
|
||||
keys.Add(dataReader.GetName(i));
|
||||
var type = dataReader.GetFieldType(i);
|
||||
sbTypes.Append(type.Name.Substring(0,2));
|
||||
if (type != null)
|
||||
{
|
||||
sbTypes.Append(type.Name.Substring(0, 2));
|
||||
}
|
||||
}
|
||||
types = sbTypes.ToString();
|
||||
return keys;
|
||||
|
Loading…
Reference in New Issue
Block a user