DD.WellWorkover.Cloud/AsbCloudDb/Model/IAsbCloudDbContext.cs

38 lines
1.6 KiB
C#

using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudDb.Model
{
public interface IAsbCloudDbContext
{
DbSet<Cluster> Clusters { get; set; }
DbSet<Customer> Customers { get; set; }
DbSet<DataSaubBase> DataSaubBases { get; set; }
DbSet<Deposit> Deposits { get; set; }
DbSet<Event> Events { get; set; }
DbSet<Message> Messages { get; set; }
DbSet<Telemetry> Telemetries { get; set; }
DbSet<TelemetryUser> TelemetryUsers { get; set; }
DbSet<User> Users { get; set; }
DbSet<Well> Wells { get; set; }
DbSet<UserRole> UserRoles { get; set; }
DbSet<Report> Reports { get; set; }
DbSet<Operation> Operations { get; set; }
DbSet<DrillingAnalysis> DrillingAnalysis { get; set; }
int SaveChanges();
int SaveChanges(bool acceptAllChangesOnSuccess);
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
IQueryable<Well> GetWellsByCustomer(int idCustomer);
IQueryable<User> GetUsersByLogin(string login);
(DateTime From, DateTime To) GetDatesRange<T>(int idTelemetry) where T : class, IIdTelemetryDate;
IEnumerable<(double? MinDepth, double? MaxDepth, DateTime BeginPeriodDate)> GetDepthToInterval(int telemetryId,
int intervalHoursTimestamp, int workStartTimestamp, double timezoneOffset);
Task<int> CreatePartitionAsync<TEntity>(string propertyName, int id, CancellationToken token = default) where TEntity : class;
}
}