using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;

namespace AspNetCoreMVC.Models
{
	[Table("Person")]
	public class Person
	{
		public int Id { get; set; }
		public string Name { get; set; }
	}

	public class PersonDbContext : DbContext
	{
		protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
		{
			string connectionString = "server=peacecloud.synology.me,21433;database=study;uid=study;pwd=Study1234";
			optionsBuilder.UseSqlServer(connectionString);
		}

		public DbSet<Person> Persons { get; set; }
    }
}
