2021-04-02 17:28:07 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2021-05-17 12:53:30 +05:00
|
|
|
|
using System;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
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; }
|
|
|
|
|
|
|
|
|
|
int SaveChanges();
|
|
|
|
|
int SaveChanges(bool acceptAllChangesOnSuccess);
|
|
|
|
|
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
IQueryable<Well> GetWellsByCustomer(int idCustomer);
|
|
|
|
|
IQueryable<User> GetUsersByLogin(string login);
|
2021-05-17 14:04:33 +05:00
|
|
|
|
(DateTime From, DateTime To) GetDatesRange<T>(int idTelemetry) where T : class, IIdTelemetryDate;
|
2021-04-07 18:01:56 +05:00
|
|
|
|
Task<int> CreatePartitionAsync<TEntity>(string propertyName, int id, CancellationToken token = default) where TEntity : class;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
}
|
|
|
|
|
}
|