Compare commits
10 Commits
2384117c79
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f86e24438 | |||
| bae076e672 | |||
| 37e56206d4 | |||
| 9db458d720 | |||
| b9c1f794e0 | |||
| 5697922eca | |||
| b317bfc425 | |||
| 0670de0abe | |||
| a1694572da | |||
| a56f2cb3d7 |
@@ -11,7 +11,6 @@ namespace Core.Blueprint.DAL.API.Controllers
|
|||||||
[Produces("application/json")]
|
[Produces("application/json")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
//test gitea
|
|
||||||
public class BlobStorageController(IBlobStorageService storageService) : ControllerBase
|
public class BlobStorageController(IBlobStorageService storageService) : ControllerBase
|
||||||
{
|
{
|
||||||
[HttpPost("UploadBlobFromFileBrowser")]
|
[HttpPost("UploadBlobFromFileBrowser")]
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
|
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
|
||||||
<PackageReference Include="Blueprint.Logging" Version="0.0.2" />
|
<PackageReference Include="Core.Blueprint.Logging" Version="1.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.10" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.10" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
|
||||||
|
|||||||
@@ -21,7 +21,11 @@ namespace Core.Blueprint.DAL.API.Extensions
|
|||||||
services.AddScoped<CollectionRepository<SampleCollection>>();
|
services.AddScoped<CollectionRepository<SampleCollection>>();
|
||||||
|
|
||||||
//SQL
|
//SQL
|
||||||
services.AddDbContext<SqlServerContext>(options => options.UseSqlServer(configuration.GetConnectionString("SQLServer")));
|
services.AddDbContext<SqlServerContext>(options =>
|
||||||
|
options.UseSqlServer(configuration.GetConnectionString("SqlServer"),
|
||||||
|
sqlOptions => sqlOptions.EnableRetryOnFailure())
|
||||||
|
);
|
||||||
|
|
||||||
services.AddScoped<ISqlSampleService, SqlSampleService>();
|
services.AddScoped<ISqlSampleService, SqlSampleService>();
|
||||||
|
|
||||||
//Storage
|
//Storage
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using Azure.Identity;
|
|
||||||
using Core.Blueprint.DAL.API.Extensions;
|
using Core.Blueprint.DAL.API.Extensions;
|
||||||
using Core.Blueprint.DAL.Mongo.Configuration;
|
using Core.Blueprint.DAL.Mongo.Configuration;
|
||||||
using Core.Blueprint.KeyVault.Configuration;
|
using Core.Blueprint.KeyVault.Configuration;
|
||||||
@@ -7,7 +6,6 @@ using Core.Blueprint.Redis.Configuration;
|
|||||||
using Core.Blueprint.SQLServer.Configuration;
|
using Core.Blueprint.SQLServer.Configuration;
|
||||||
using Core.Blueprint.Storage.Configuration;
|
using Core.Blueprint.Storage.Configuration;
|
||||||
using Microsoft.AspNetCore.HttpLogging;
|
using Microsoft.AspNetCore.HttpLogging;
|
||||||
using Microsoft.Extensions.Configuration.AzureAppConfiguration;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
@@ -41,9 +39,9 @@ builder.Services.AddMemoryCache();
|
|||||||
builder.Services.AddLogs(builder);
|
builder.Services.AddLogs(builder);
|
||||||
builder.Services.AddKeyVault(builder.Configuration);
|
builder.Services.AddKeyVault(builder.Configuration);
|
||||||
builder.Services.AddBlobStorage(builder.Configuration);
|
builder.Services.AddBlobStorage(builder.Configuration);
|
||||||
//builder.Services.AddRedis(builder.Configuration);
|
builder.Services.AddRedis(builder.Configuration);
|
||||||
//builder.Services.AddMongoLayer(builder.Configuration);
|
builder.Services.AddMongoLayer(builder.Configuration);
|
||||||
//builder.Services.AddSQLServer(builder.Configuration);
|
builder.Services.AddSQLServer(builder.Configuration);
|
||||||
builder.Services.AddDALLayerServices(builder.Configuration);
|
builder.Services.AddDALLayerServices(builder.Configuration);
|
||||||
|
|
||||||
builder.Host.ConfigureServices((context, services) =>
|
builder.Host.ConfigureServices((context, services) =>
|
||||||
|
|||||||
@@ -9,17 +9,25 @@
|
|||||||
"DefaultCacheDurationInMinutes": 3
|
"DefaultCacheDurationInMinutes": 3
|
||||||
},
|
},
|
||||||
"Vault": {
|
"Vault": {
|
||||||
"Address": "http://localhost:8200",
|
"Address": "https://vault.dream-views.com/:8200",
|
||||||
"Token": "hvs.kDZnAfrvfcMNrom6RmlEhZ7I",
|
"Token": "hvs.TGz6P3AsKpYuODMrs11Msiza",
|
||||||
"SecretMount": "secret"
|
"SecretMount": "thalos"
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"BlobStorage": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;"
|
"BlobStorage": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFeqCnf2P==;BlobEndpoint=http://100.123.31.103:10000/devstoreaccount1;QueueEndpoint=http://100.123.31.103:10001/devstoreaccount1;TableEndpoint=http://100.123.31.103:10002/devstoreaccount1;",
|
||||||
|
"MongoDB": "mongodb://admin_agile:Admin%40agileWebs@portainer.white-enciso.pro:27017/?authMechanism=SCRAM-SHA-256",
|
||||||
|
"SqlServer": "Server=100.123.31.103,1433;Database=Blueprint;User Id=sa;Password=Alpha-Whisky-2025;TrustServerCertificate=True;",
|
||||||
|
"Redis": "100.123.31.103:6379"
|
||||||
|
},
|
||||||
|
"MongoDb": {
|
||||||
|
"DatabaseName": "Blueprint",
|
||||||
|
"LocalAudience": "test",
|
||||||
|
"Audience": "test",
|
||||||
},
|
},
|
||||||
"BlobStorage": {
|
"BlobStorage": {
|
||||||
"ContainerName": "blueprint",
|
"ContainerName": "blueprint",
|
||||||
"AccountName": "devstoreaccount1",
|
"AccountName": "devstoreaccount1",
|
||||||
"AccountKey": "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="
|
"AccountKey": "Eby8vdM02xNOcqFeqCnf2P=="
|
||||||
},
|
},
|
||||||
"ServiceSettings": {
|
"ServiceSettings": {
|
||||||
"ApplicationName": "blueprint",
|
"ApplicationName": "blueprint",
|
||||||
|
|||||||
@@ -4,9 +4,16 @@ namespace Core.Blueprint.DAL.KeyVault.Contracts
|
|||||||
{
|
{
|
||||||
public interface IKeyVaultService
|
public interface IKeyVaultService
|
||||||
{
|
{
|
||||||
Task<KeyVaultResponse> CreateSecretAsync(KeyVaultRequest secret, CancellationToken cancellationToken);
|
Task<KeyVaultResponse> CreateSecretAsync(
|
||||||
Task<Tuple<KeyVaultResponse, string?>> GetSecretAsync(string secret, CancellationToken cancellationToken);
|
KeyVaultRequest secret, CancellationToken cancellationToken);
|
||||||
Task<Tuple<string, bool>> DeleteSecretAsync(string secretName, CancellationToken cancellationToken);
|
|
||||||
Task<Tuple<KeyVaultResponse, string>> UpdateSecretAsync(KeyVaultRequest secretName, CancellationToken cancellationToken);
|
Task<(KeyVaultResponse Secret, string? Message)> GetSecretAsync(
|
||||||
|
string secret, CancellationToken cancellationToken);
|
||||||
|
|
||||||
|
Task<(string Message, bool Deleted)> DeleteSecretAsync(
|
||||||
|
string secretName, CancellationToken cancellationToken);
|
||||||
|
|
||||||
|
Task<(KeyVaultResponse Secret, string? Message)> UpdateSecretAsync(
|
||||||
|
KeyVaultRequest secretName, CancellationToken cancellationToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blueprint.KeyVault" Version="0.0.3" />
|
<PackageReference Include="Core.Blueprint.KeyVault" Version="1.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -5,24 +5,29 @@ namespace Core.Blueprint.DAL.KeyVault.Services
|
|||||||
{
|
{
|
||||||
public class KeyVaultService(IKeyVaultProvider keyVaultProvider) : IKeyVaultService
|
public class KeyVaultService(IKeyVaultProvider keyVaultProvider) : IKeyVaultService
|
||||||
{
|
{
|
||||||
public async Task<KeyVaultResponse> CreateSecretAsync(KeyVaultRequest newSecret, CancellationToken cancellationToken)
|
public async Task<KeyVaultResponse> CreateSecretAsync(
|
||||||
|
KeyVaultRequest newSecret, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var result = await keyVaultProvider.CreateSecretAsync(newSecret, cancellationToken);
|
var result = await keyVaultProvider.CreateSecretAsync(newSecret, cancellationToken);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
public async Task<Tuple<KeyVaultResponse, string?>> GetSecretAsync(string secretName, CancellationToken cancellationToken)
|
|
||||||
|
public async Task<(KeyVaultResponse Secret, string? Message)> GetSecretAsync(
|
||||||
|
string secretName, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var result = await keyVaultProvider.GetSecretAsync(secretName, cancellationToken: cancellationToken);
|
var result = await keyVaultProvider.GetSecretAsync(secretName, cancellationToken);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Tuple<KeyVaultResponse, string>> UpdateSecretAsync(KeyVaultRequest newSecret, CancellationToken cancellationToken)
|
public async Task<(KeyVaultResponse Secret, string? Message)> UpdateSecretAsync(
|
||||||
|
KeyVaultRequest newSecret, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var result = await keyVaultProvider.UpdateSecretAsync(newSecret, cancellationToken);
|
var result = await keyVaultProvider.UpdateSecretAsync(newSecret, cancellationToken);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Tuple<string, bool>> DeleteSecretAsync(string secretName, CancellationToken cancellationToken)
|
public async Task<(string Message, bool Deleted)> DeleteSecretAsync(
|
||||||
|
string secretName, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var result = await keyVaultProvider.DeleteSecretAsync(secretName, cancellationToken);
|
var result = await keyVaultProvider.DeleteSecretAsync(secretName, cancellationToken);
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blueprint.Mongo" Version="0.0.3" />
|
<PackageReference Include="Core.Blueprint.Logging" Version="1.0.0" />
|
||||||
<PackageReference Include="Blueprint.Redis" Version="0.0.1" />
|
<PackageReference Include="Core.Blueprint.Mongo" Version="1.0.0" />
|
||||||
|
<PackageReference Include="Core.Blueprint.Redis" Version="1.0.0" />
|
||||||
<PackageReference Include="Mapster" Version="7.4.0" />
|
<PackageReference Include="Mapster" Version="7.4.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -5,22 +5,21 @@ using Core.Blueprint.Mongo;
|
|||||||
using Core.Blueprint.Redis;
|
using Core.Blueprint.Redis;
|
||||||
using Core.Blueprint.Redis.Helpers;
|
using Core.Blueprint.Redis.Helpers;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.Extensions.Options;
|
|
||||||
|
|
||||||
namespace Core.Blueprint.DAL.Mongo.Service
|
namespace Core.Blueprint.DAL.Mongo.Service
|
||||||
{
|
{
|
||||||
public class MongoSampleService : IMongoSampleService
|
public class MongoSampleService : IMongoSampleService
|
||||||
{
|
{
|
||||||
private readonly CollectionRepository<SampleCollection> repository;
|
private readonly CollectionRepository<SampleCollection> repository;
|
||||||
private readonly CacheSettings cacheSettings;
|
private readonly ICacheSettings cacheSettings;
|
||||||
private readonly IRedisCacheProvider cacheProvider;
|
private readonly IRedisCacheProvider cacheProvider;
|
||||||
|
|
||||||
public MongoSampleService(CollectionRepository<SampleCollection> repository,
|
public MongoSampleService(CollectionRepository<SampleCollection> repository,
|
||||||
IRedisCacheProvider cacheProvider, IOptions<CacheSettings> cacheSettings)
|
IRedisCacheProvider cacheProvider, ICacheSettings cacheSettings)
|
||||||
{
|
{
|
||||||
this.repository = repository;
|
this.repository = repository;
|
||||||
this.repository.CollectionInitialization();
|
this.repository.CollectionInitialization();
|
||||||
this.cacheSettings = cacheSettings.Value;
|
this.cacheSettings = cacheSettings;
|
||||||
this.cacheProvider = cacheProvider;
|
this.cacheProvider = cacheProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,6 +29,8 @@ namespace Core.Blueprint.DAL.Mongo.Service
|
|||||||
|
|
||||||
await this.repository.InsertOneAsync(sampleCollection);
|
await this.repository.InsertOneAsync(sampleCollection);
|
||||||
|
|
||||||
|
await ResetCollectionCache();
|
||||||
|
|
||||||
return sampleCollection;
|
return sampleCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +44,7 @@ namespace Core.Blueprint.DAL.Mongo.Service
|
|||||||
|
|
||||||
var sample = await this.repository.FindByIdAsync(_id);
|
var sample = await this.repository.FindByIdAsync(_id);
|
||||||
|
|
||||||
await cacheProvider.SetAsync(cacheKey, sample);
|
await cacheProvider.SetAsync(cacheKey, sample, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes));
|
||||||
|
|
||||||
return sample;
|
return sample;
|
||||||
}
|
}
|
||||||
@@ -58,7 +59,7 @@ namespace Core.Blueprint.DAL.Mongo.Service
|
|||||||
|
|
||||||
var samples = await this.repository.AsQueryable();
|
var samples = await this.repository.AsQueryable();
|
||||||
|
|
||||||
await cacheProvider.SetAsync(cacheKey, samples);
|
await cacheProvider.SetAsync(cacheKey, samples, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes));
|
||||||
|
|
||||||
return samples;
|
return samples;
|
||||||
}
|
}
|
||||||
@@ -67,14 +68,32 @@ namespace Core.Blueprint.DAL.Mongo.Service
|
|||||||
{
|
{
|
||||||
await this.repository.ReplaceOneAsync(entity);
|
await this.repository.ReplaceOneAsync(entity);
|
||||||
|
|
||||||
|
await ResetCollectionCache();
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async ValueTask<SampleCollection> DeleteSample(string _id, CancellationToken cancellationToken)
|
public async ValueTask<SampleCollection> DeleteSample(string _id, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var entity = await this.repository.DeleteOneAsync(doc => doc._Id == _id);
|
var entity = await this.repository.DeleteOneAsync(doc => doc._Id == _id);
|
||||||
|
|
||||||
|
await ResetCollectionCache();
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Temporary method to "reset" collections cache
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private async Task ResetCollectionCache()
|
||||||
|
{
|
||||||
|
//TODO: remoge this mehtod when necessary.
|
||||||
|
var cacheKey = CacheKeyHelper.GenerateCacheKey(this, "GetAllSamples");
|
||||||
|
|
||||||
|
await cacheProvider.SetAsync(cacheKey, Enumerable.Empty<SampleCollection>(), null);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blueprint.Redis" Version="0.0.1" />
|
<PackageReference Include="Core.Blueprint.Redis" Version="1.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace Core.Blueprint.DAL.SQLServer.Context
|
|||||||
public sealed class SqlServerContext : DbContext
|
public sealed class SqlServerContext : DbContext
|
||||||
{
|
{
|
||||||
public SqlServerContext(DbContextOptions<SqlServerContext> options) : base(options) { }
|
public SqlServerContext(DbContextOptions<SqlServerContext> options) : base(options) { }
|
||||||
public DbSet<Sample> UserProjects { get; set; }
|
public DbSet<Sample> Samples { get; set; }
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blueprint.Redis" Version="0.0.1" />
|
<PackageReference Include="Core.Blueprint.Redis" Version="1.0.0" />
|
||||||
<PackageReference Include="Blueprint.SQLServer" Version="0.0.1" />
|
<PackageReference Include="Core.Blueprint.SQLServer" Version="1.0.0" />
|
||||||
<PackageReference Include="Mapster" Version="7.4.1-pre01" />
|
<PackageReference Include="Mapster" Version="7.4.1-pre01" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -6,18 +6,17 @@ using Core.Blueprint.DAL.SQLServer.Entities.Request;
|
|||||||
using Core.Blueprint.Redis;
|
using Core.Blueprint.Redis;
|
||||||
using Core.Blueprint.Redis.Helpers;
|
using Core.Blueprint.Redis.Helpers;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.Extensions.Options;
|
|
||||||
|
|
||||||
public class SqlSampleService : ISqlSampleService
|
public class SqlSampleService : ISqlSampleService
|
||||||
{
|
{
|
||||||
private readonly IEntityRepository<Sample, SqlServerContext> _sqlSampleRepository;
|
private readonly IEntityRepository<Sample, SqlServerContext> _sqlSampleRepository;
|
||||||
private readonly CacheSettings cacheSettings;
|
private readonly ICacheSettings cacheSettings;
|
||||||
private readonly IRedisCacheProvider cacheProvider;
|
private readonly IRedisCacheProvider cacheProvider;
|
||||||
|
|
||||||
public SqlSampleService(IEntityRepository<Sample, SqlServerContext> sqlSampleRepository, IRedisCacheProvider cacheProvider, IOptions<CacheSettings> cacheSettings)
|
public SqlSampleService(IEntityRepository<Sample, SqlServerContext> sqlSampleRepository, IRedisCacheProvider cacheProvider, ICacheSettings cacheSettings)
|
||||||
{
|
{
|
||||||
_sqlSampleRepository = sqlSampleRepository;
|
_sqlSampleRepository = sqlSampleRepository;
|
||||||
this.cacheSettings = cacheSettings.Value;
|
this.cacheSettings = cacheSettings;
|
||||||
this.cacheProvider = cacheProvider;
|
this.cacheProvider = cacheProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,7 +29,7 @@ public class SqlSampleService : ISqlSampleService
|
|||||||
|
|
||||||
var samples = await _sqlSampleRepository.GetAllAsync();
|
var samples = await _sqlSampleRepository.GetAllAsync();
|
||||||
|
|
||||||
await cacheProvider.SetAsync(cacheKey, samples);
|
await cacheProvider.SetAsync(cacheKey, samples, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes));
|
||||||
|
|
||||||
return samples;
|
return samples;
|
||||||
}
|
}
|
||||||
@@ -44,7 +43,7 @@ public class SqlSampleService : ISqlSampleService
|
|||||||
|
|
||||||
var sample = await _sqlSampleRepository.GetByIdAsync(id);
|
var sample = await _sqlSampleRepository.GetByIdAsync(id);
|
||||||
|
|
||||||
await cacheProvider.SetAsync(cacheKey, sample);
|
await cacheProvider.SetAsync(cacheKey, sample, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes));
|
||||||
|
|
||||||
return sample;
|
return sample;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blueprint.Storage" Version="0.0.3" />
|
<PackageReference Include="Core.Blueprint.Storage" Version="1.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
9
nuget.config
Normal file
9
nuget.config
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<packageSources>
|
||||||
|
<!-- Tu BaGet primero -->
|
||||||
|
<add key="BaGet" value="https://nuget.dream-views.com/v3/index.json" protocolVersion="3" />
|
||||||
|
<!-- NuGet oficial como fallback (si quieres) -->
|
||||||
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||||
|
</packageSources>
|
||||||
|
</configuration>
|
||||||
Reference in New Issue
Block a user