TestService

optimize
wanghaomei 9 months ago
parent ee74a7b097
commit 955631e257

@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging;
using Myshipping.Application.Entity;
using Myshipping.Core;
using Myshipping.Core.Service;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@ -20,20 +21,25 @@ namespace Myshipping.Application
private readonly ILogger<TestService> _logger;
private readonly ISysCacheService _cache;
private readonly SqlSugarRepository<BookingOrder> _rep;
//private readonly SqlSugarRepository<BookingOrder> _rep;
private readonly ISqlSugarClient _sqlSugarClient;
public TestService(ILogger<TestService> logger, ISysCacheService cache,
SqlSugarRepository<BookingOrder> rep)
public TestService(ILogger<TestService> logger, ISysCacheService cache
//,SqlSugarRepository<BookingOrder> rep
, ISqlSugarClient sqlSugarClient
)
{
_logger = logger;
_cache = cache;
this._rep = rep;
//this._rep = rep;
_sqlSugarClient = sqlSugarClient;
}
[HttpGet("/Test/Get")]
public async Task<string> Get()
{
return "ok";
var c = _sqlSugarClient.Queryable<BookingOrder>().Count();
return $"ok:{c}";
}
}
}

Loading…
Cancel
Save