49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
using IRaCIS.Application.Interfaces;
|
|
using IRaCIS.Application.Contracts;
|
|
using IRaCIS.Core.Infra.EFCore;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.Globalization;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace IRaCIS.Application.Services
|
|
{
|
|
[ApiExplorerSettings(GroupName = "Institution")]
|
|
public class TestService : BaseService
|
|
{
|
|
private readonly IRepository<Dictionary> _dicRepository;
|
|
|
|
public TestService(IRepository<Dictionary> dicRepository)
|
|
{
|
|
_dicRepository = dicRepository;
|
|
}
|
|
|
|
[HttpPost]
|
|
public string Get(testModel testModel)
|
|
{
|
|
|
|
//var d = _repository.Where<User>().Select(t => t.FullName).FirstOrDefault();
|
|
var c = _dicRepository.Where(t => t.ParentId != null).Select(t => t.MappedValue).First();
|
|
CultureInfo culture = CultureInfo.CurrentUICulture;
|
|
|
|
var a = 123;
|
|
|
|
var b = _localizer["test{0}", "测试"];
|
|
return _localizer["test{0}", "测试"];
|
|
}
|
|
}
|
|
|
|
public class testModel
|
|
{
|
|
|
|
//[Required]
|
|
//public string Id { get; set; }
|
|
}
|
|
}
|
|
|
|
|
|
namespace Localization
|
|
{
|
|
public class SharedResource
|
|
{
|
|
}
|
|
} |