public static void InitializeDB()
        {
            Database.SetInitializer(new ProjectReportDemoDBInitializer());
            var ctx = new ProjectReportDemoCtx();

            ctx.Database.Initialize(false);
        }
        public static Project GetOrCreate(ProjectReportDemoCtx ctx, Guid id)
        {
            Project result = ctx.Project.SingleOrDefault(item => item.Id == id);

            if (result == null)
            {
                result    = new Project();
                result.Id = id;
                ctx.Project.Add(result);
            }
            return(result);
        }
        public static CounterAction GetOrCreate(ProjectReportDemoCtx ctx, Guid id)
        {
            CounterAction result = ctx.CounterAction.SingleOrDefault(item => item.Id == id);

            if (result == null)
            {
                result    = new CounterAction();
                result.Id = id;
                ctx.CounterAction.Add(result);
            }
            return(result);
        }
        public static InterestGroup GetOrCreate(ProjectReportDemoCtx ctx, Guid id)
        {
            InterestGroup result = ctx.InterestGroup.SingleOrDefault(item => item.Id == id);

            if (result == null)
            {
                result    = new InterestGroup();
                result.Id = id;
                ctx.InterestGroup.Add(result);
            }
            return(result);
        }
 public void Delete(ProjectReportDemoCtx ctx)
 {
     ctx.Project.Remove(this);
 }
 public void Delete(ProjectReportDemoCtx ctx)
 {
     ctx.CounterAction.Remove(this);
 }
 public void Delete(ProjectReportDemoCtx ctx)
 {
     ctx.InterestGroup.Remove(this);
 }