Implement all car endpoints
This commit is contained in:
19
src/WebApi/Persistence/ApplicationDbContext.cs
Normal file
19
src/WebApi/Persistence/ApplicationDbContext.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Vegasco.WebApi.Cars;
|
||||
using Vegasco.WebApi.Common;
|
||||
using Vegasco.WebApi.Users;
|
||||
|
||||
namespace Vegasco.WebApi.Persistence;
|
||||
|
||||
public class ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : DbContext(options)
|
||||
{
|
||||
public DbSet<Car> Cars { get; set; }
|
||||
|
||||
public DbSet<User> Users { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
modelBuilder.ApplyConfigurationsFromAssembly(typeof(IWebApiMarker).Assembly);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user