Моя проблема заключается в следующем:
в ApplicationDbContext у меня есть клиенты DbSet, в таблице dbo у меня 5 записей. Когда я пытаюсь выполнить запрос linQ, он получает 0 записей, хотя у меня 5 записей. Я думаю, что я пропускаю некоторые IEnumerable в классе или что-то?
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public DbSet<Carer> Carers { get; set; }
public DbSet<Appointment> Appointments { get; set; }
public DbSet<Client> Clients { get; set; }
}
public class Client
{
[Key]
public int IdClient { get; set; }
public string FullName { get; set; }
public string FullAdress { get; set; }
public string PostCode { get; set; }
public string PhoneNumber { get; set; }
}
var xx = _Context.Clients; // this returns 0 records