añadido Context de entity y correjidos algunos temas de las entidades
This commit is contained in:
17
Modelo/Context.cs
Normal file
17
Modelo/Context.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Entidades;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Modelo;
|
||||
|
||||
public class Context : Microsoft.EntityFrameworkCore.DbContext
|
||||
{
|
||||
public DbSet<Categoria> Categorias { get; set; }
|
||||
public DbSet<Cliente> Clientes { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{ // Esto de poner credenciales sueltas está mal
|
||||
optionsBuilder.UseSqlServer(@"Server=fedesrv.ddns.net,1433;Database=ControlStockDAS;User Id=ProyectoDas;Password=<IL-:aQI?TK{uRw:AU>A?5?~*=Gux'}JT0me,z5Cf^f(s'-gy[G#-jt%b&uHe+/,$Gl>qkXl-c[@&e(\.V?[3)\w|aMH+<GnkIo*99MNJ}:L=j<T,^$`8J\dXw6>^67x;Trusted_Connection=False;Encrypt=False;Connection Timeout=5;");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user