Skip to content

Instantly share code, notes, and snippets.

@lest-xu
Last active February 8, 2019 14:26
Show Gist options
  • Save lest-xu/38f04f750328a97cdde8dc24acf0d749 to your computer and use it in GitHub Desktop.
Save lest-xu/38f04f750328a97cdde8dc24acf0d749 to your computer and use it in GitHub Desktop.
namespace Angular6Mvc5.Models
{
public class Order
{
public int Id { get; set; }
public DateTime OrderDate { get; set; }
public int OrderNumber { get; set; }
public int CustomerId { get; set; }
public double TotalAmount { get; set; }
public Customer Customer { get; set; }
public Order(DataRow row)
{
this.Id = Convert.ToInt32(row["Id"]);
this.OrderDate = Convert.ToDateTime(row["OrderDate"]);
this.OrderNumber = Convert.ToInt32(row["OrderNumber"]);
this.CustomerId = Convert.ToInt32(row["CustomerId"]);
this.TotalAmount = Convert.ToDouble(row["TotalAmount"]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment