Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

177
Vistas
Access Database created with DBContext

recently i started to learn C# and ASP.NET Core for a new job, as part of the practice i created a small api for CRUD operation that includes a database, i have created the DB using the entity framework core. I wanted to figure out how does this DB created and all of the tables in it because in the code i did not mention any tables name or something.. ? and one more thing is can i access this DB using SSMS or some other GUI to actually see the data ? Note: I am using Visual Studio 2019

namespace TodoApi.Models
{
    public class TodoContext : DbContext
    {
        public TodoContext(DbContextOptions<TodoContext> options)
            : base(options)
        {}

        public DbSet<TodoItem> TodoItems { get; set; }
    }
}

Startup.cs:

 services.AddDbContext<TodoContext>(opt =>
       opt.UseInMemoryDatabase("TodoList"));

Thank you in advance !

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

So, you're using an in-memory database. This means that's it's ultimately all stored in memory in the application. That means there will be no files on disk, and no way to access it remotely using a tool like SSMS. That's also why you don't need to specify a table name etc., because it's not needed for an in-memory database because it's kind of just a fancy way of storing all the data in an array, as a simple analogy. The in-memory provider's primary usage is for testing.

If you want to be able to view the contents of the database in a tool such as SSMS, you'll need to use the SQL Server provider (which will require a connection string etc.), which would be configured with opt.UseSqlServer(...). Alternatively if you didn't want to use SQL Server, you could use the SQLite provider.

Documentation about the different providers available can be found here.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda