using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Login", Schema = "dbo")]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public string UserName { get; set; }
public string Email { get; set; }
public static void Main()
TableAttribute tableAttribute1 = (TableAttribute)typeof(Login).GetCustomAttributes(typeof(TableAttribute)).FirstOrDefault();
Console.WriteLine("{0}", tableAttribute1.Schema);
TableAttribute tableAttribute2 = (TableAttribute)lg.GetType().GetCustomAttributes(typeof(TableAttribute)).FirstOrDefault();
Console.WriteLine("{0}", tableAttribute1.Schema);