Skip to content

Instantly share code, notes, and snippets.

@josephhhhh
Last active February 14, 2018 05:18
Show Gist options
  • Save josephhhhh/95f041edff454a1b9618abdd66796293 to your computer and use it in GitHub Desktop.
Save josephhhhh/95f041edff454a1b9618abdd66796293 to your computer and use it in GitHub Desktop.
namespace CascadeDelete.Models
{
public class City
{
public City()
{
Owners = new List<ResidentCityOwn>();
Residents = new List<Resident>();
}
public int Id { get; set; }
[Required]
[StringLength(40)]
public string Name { get; set; }
// navigations
public virtual ICollection<ResidentCityOwn> Owners { get; set; }
public virtual ICollection<Resident> Residents { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment