Add db connect support
This commit is contained in:
parent
22fbb522d2
commit
c3c740ed78
|
|
@ -1,15 +1,17 @@
|
||||||
using LFlow.Base.Interfaces;
|
using LFlow.Base.Interfaces;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
namespace LFlow.Home.Models.DataModels;
|
namespace LFlow.Home.Models.DataModels;
|
||||||
|
|
||||||
|
[SugarTable("T_B_HOME")]
|
||||||
public class HomeModel : IDataModel
|
public class HomeModel : IDataModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ID
|
/// ID - GUID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "ID", IsPrimaryKey = true)]
|
||||||
public string? Id { get; set; }
|
public string? Id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"HomeModel {Id}";
|
return $"HomeModel {Id}";
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,11 @@ using LFlow.Base.Interfaces;
|
||||||
|
|
||||||
// using LFlow.Interfaces;
|
// using LFlow.Interfaces;
|
||||||
using LFlow.Home.Models.DataModels;
|
using LFlow.Home.Models.DataModels;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
namespace LFlow.Home.Repositorys;
|
namespace LFlow.Home.Repositorys;
|
||||||
|
|
||||||
public class HomeRepo : IRepo<HomeModel, string>
|
public class HomeRepo(ISqlSugarClient db) : IRepo<HomeModel, string>
|
||||||
{
|
{
|
||||||
public HomeModel Delete(string id)
|
public HomeModel Delete(string id)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue