private IssueData GetIssueData(int id)
        {
            var issueData = new IssueData();
            var context = new FirstIssueContext();
            var i = (from c in context.Issues
                     where c.IssueId == id
                     select c).FirstOrDefault();
            if (i != null)
            {
                issueData.IssueId = i.IssueId;
                issueData.IssueDate = i.PublishDate;
                issueData.IssueTitle = i.IssueName;

                foreach (var a in i.Articles.ToList())
                {
                    issueData.Articles.Add(new ArticleData
                    {
                        Author = a.Author.FullName,
                        Id = a.ArticleId,
                        Order = a.Order,
                        Title = a.Title,
                        SubTitle = string.Empty
                    });
                }
            }
            return issueData;
        }
 private static void SetupDatabase()
 {
     // Cant use this initializer in production - got to be migrations
     Database.SetInitializer(new FirstIssueInitializer());
     var context = new FirstIssueContext();
     context.Database.Initialize(true);
     // context.Database.Initialize(false);
 }
 public ApiBaseController()
 {
     _dbContext = new FirstIssueContext();
 }