forked from ddrilling/AsbCloudServer
30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
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);
|
|
Task<int> CreatePartitionAsync<TEntity>(string propertyName, int id, CancellationToken token = default) where TEntity : class;
|
|
}
|
|
} |