/*public void WorkItemAWSPost()
        {
            var wif = new dalewilbanks.net.factories.WorkItemFactoryAWS(
            System.Configuration.ConfigurationManager.AppSettings["AWSAccessKey"],
            System.Configuration.ConfigurationManager.AppSettings["AWSSecretKey"]);

            int workItemID = 0;
            Int32.TryParse(Request["WorkItemID"], out workItemID);

            if (workItemID != 0)
            {
                var workItem = new dalewilbanks.net.entities.WorkItem() { WorkItemID = workItemID, Name = Request["Name"], Type = Request["Type"], Description = Request["Description"], Attachments = Request["Attachments"], EnteredBy = Request["EnteredBy"], EntryDate = Request["EntryDate"] };
                wif.Save(workItem);
            }
        }*/

        public void WorkItemEFPost()
        {
            var workItemsContext = new WorkItemContext();

            var workItem = new dalewilbanks.net.entities.WorkItem() { Name = Request["Name"], Type = Request["Type"], Description = Request["Description"], Attachments = String.Empty, EnteredBy = Request["EnteredBy"], EntryDate = Request["EntryDate"] };
            workItemsContext.WorkItems.Add(workItem);
            workItemsContext.SaveChanges();
        }
        static void Main(string[] args)
        {
            Database.SetInitializer<WorkItemContext>(new CreateDatabaseIfNotExists<WorkItemContext>());

            var workItems = new WorkItemContext();

            workItems.WorkItems.Add(new WorkItem { Attachments = "none", Description = "description 2", EnteredBy = "dale wilbanks", EntryDate = DateTime.Now.ToString(), Name = "Second EF work item", Type = "Bug" });

            workItems.SaveChanges();
        }