Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace app.ORM.Models
- {
- class OrderForm
- {
- public decimal OrderFormID { get; private set; }
- public DateTime Created { get; set; }
- public bool Compleated { get; set; }
- public UserSession UserSession { get; set; }
- public List<OrderItem> OrderItems { get; set; }
- public OrderForm(DateTime created, bool compleated, UserSession userSession) : this (-1, created, compleated, userSession)
- {
- }
- public OrderForm(decimal orderFormID, DateTime created, bool compleated, UserSession userSession) {
- this.OrderFormID = orderFormID;
- this.Created = created;
- this.Compleated = compleated;
- this.UserSession = userSession;
- this.OrderItems = new List<OrderItem>();
- }
- public void addItemToOrder(OrderItem orderItem) {
- this.OrderItems.Add(orderItem);
- }
- public void removeItemFromOrder(OrderItem orderItem)
- {
- this.OrderItems.Remove(orderItem);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement