public static ITicket Create() { var config = Convert.ToBoolean(ConfigurationManager.AppSettings["setting1"]); if (config) { return(Ticket.Create(1, "des", Status.Open, 10)); } else { return(PromoTicket.Create(1, "des")); } }
public static PromoTicket Create(int id, string description) { var entity = new PromoTicket(id, description); return(entity); }