2026-02-24 20:44:16 +00:00
|
|
|
|
using System.Text.Json;
|
|
|
|
|
|
using Sozsoft.Platform.Localization;
|
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
using Volo.Abp;
|
|
|
|
|
|
using Volo.Abp.Application.Services;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Sozsoft.Platform;
|
|
|
|
|
|
|
|
|
|
|
|
/* Inherit your application services from this class.
|
|
|
|
|
|
*/
|
|
|
|
|
|
public abstract class PlatformAppService : ApplicationService
|
|
|
|
|
|
{
|
|
|
|
|
|
protected PlatformAppService()
|
|
|
|
|
|
{
|
|
|
|
|
|
LocalizationResource = typeof(PlatformResource);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class TestAppService : PlatformAppService
|
|
|
|
|
|
{
|
|
|
|
|
|
public dynamic GetTest()
|
|
|
|
|
|
{
|
2026-05-26 09:29:46 +00:00
|
|
|
|
Logger.LogWarning("Sending test message. {Count}", 3);
|
|
|
|
|
|
Logger.LogWarning("Sending test message. {Count} adet kayıt ok.", 3);
|
2026-02-24 20:44:16 +00:00
|
|
|
|
throw new UserFriendlyException("Toplam 1000'i geçemez");
|
|
|
|
|
|
//throw new System.Exception("Toplam 1000'i geçemez");
|
|
|
|
|
|
|
|
|
|
|
|
return new OkObjectResult(new { Toplam = 2 });
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public dynamic PostTest(dynamic input)
|
|
|
|
|
|
{
|
|
|
|
|
|
var input2 = (string)JsonSerializer.Serialize(input);
|
|
|
|
|
|
Logger.LogInformation(input2);
|
|
|
|
|
|
|
|
|
|
|
|
return new OkObjectResult(input);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|