diff --git a/Persistence.Client/Persistence.Client.csproj b/Persistence.Client/Persistence.Client.csproj deleted file mode 100644 index 7d81fc3..0000000 --- a/Persistence.Client/Persistence.Client.csproj +++ /dev/null @@ -1,62 +0,0 @@ - - - - net8.0 - enable - enable - - - True - - Persistence.Client - - 1.0.$([System.DateTime]::UtcNow.ToString(yyMM.ddHH)) - - 1.0.$([System.DateTime]::UtcNow.ToString(yyMM.ddHH)) - - Persistence.Client - - - Digital Drilling - - Digital Drilling - - Пакет для получения клиентов для работы с Persistence сервисом - - - https://git.ddrilling.ru/on.nemtina/persistence.git - - git - - true - - snupkg - - C:\Projects\Nuget - - - Readme.md - - - - 1.0.$([System.DateTime]::UtcNow.ToString(yyMM.ddHH)) - 1.0.$([System.DateTime]::UtcNow.ToString(yyMM.ddHH)) - - - - - - - - - - - - - - - - - - - diff --git a/Persistence.Database.Postgres/Readme.md b/Persistence.Database.Postgres/Readme.md deleted file mode 100644 index 7172774..0000000 --- a/Persistence.Database.Postgres/Readme.md +++ /dev/null @@ -1,11 +0,0 @@ -## Создать миграцию -``` -dotnet ef migrations add --project Persistence.Database.Postgres - -``` - -## Откатить миграцию -``` -dotnet ef migrations remove --project Persistence.Database.Postgres -``` -Удаляется последняя созданная миграция. \ No newline at end of file diff --git a/Persistence.Repository/Repositories/DataSourceSystemRepository.cs b/Persistence.Repository/Repositories/DataSourceSystemRepository.cs deleted file mode 100644 index 5862ea3..0000000 --- a/Persistence.Repository/Repositories/DataSourceSystemRepository.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Mapster; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Caching.Memory; -using Newtonsoft.Json.Linq; -using Persistence.Database.Entity; -using Persistence.Models; -using Persistence.Repositories; - -namespace Persistence.Repository.Repositories; -public class DataSourceSystemRepository : IDataSourceSystemRepository -{ - protected DbContext db; - public DataSourceSystemRepository(DbContext db) - { - this.db = db; - } - protected virtual IQueryable GetQueryReadOnly() => db.Set(); - - public virtual async Task Add(DataSourceSystemDto dataSourceSystemDto, CancellationToken token) - { - var entity = dataSourceSystemDto.Adapt(); - - await db.Set().AddAsync(entity, token); - await db.SaveChangesAsync(token); - } - - public virtual async Task> Get(CancellationToken token) - { - var query = GetQueryReadOnly(); - var entities = await query.ToArrayAsync(token); - var dtos = entities.Select(e => e.Adapt()); - - return dtos; - } -}