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