Skip to content

Instantly share code, notes, and snippets.

@xuzhg
Created July 3, 2018 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuzhg/871e540a3f7e9634c374398b68655523 to your computer and use it in GitHub Desktop.
Save xuzhg/871e540a3f7e9634c374398b68655523 to your computer and use it in GitHub Desktop.
bookstoremodelclass
// Book
public class Book
{
public int Id { get; set; }
public string ISBN { get; set; }
public string Title { get; set; }
public string Author { get; set; }
public decimal Price { get; set; }
public Address Location { get; set; }
public Press Press { get; set; }
}
// Press
public class Press
{
public int Id { get; set; }
public string Name { get; set; }
public string Email { get; set; }
public Category Category { get; set; }
}
// Category
public enum Category
{
Book,
Magazine,
EBook
}
// Address
public class Address
{
public string City { get; set; }
public string Street { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment