Commit 2abd503b authored by Alexey Goikolov's avatar Alexey Goikolov

Добавил модель User и прописал в MobileContext

parent ff9f7f3d
...@@ -7,6 +7,7 @@ namespace Lesson49.Models.Data ...@@ -7,6 +7,7 @@ namespace Lesson49.Models.Data
public DbSet<Phone> Phones { get; set; } public DbSet<Phone> Phones { get; set; }
public DbSet<Order> Orders { get; set; } public DbSet<Order> Orders { get; set; }
public DbSet<Brand> Brands { get; set; } public DbSet<Brand> Brands { get; set; }
public DbSet<User> Users { get; set; }
public MobileContext(DbContextOptions<MobileContext> options) :base(options){} public MobileContext(DbContextOptions<MobileContext> options) :base(options){}
} }
......
namespace Lesson49.Models
{
public class User
{
public string Name { get; set; }
public string Surname { get; set; }
public int Age { get; set; }
public override string ToString()
{
return $"Name - {Name}\nSurname - {Surname}\nAge - {Age}";
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment