public void AddNewStatistics(StatisticsData data)
        {
            using (var context = new ProjectManagerDBEntities())
            {
                Statistics stat = new Statistics()
                {
                    ProjectId = data.ProjectId,
                    Name = data.Name,
                    CreatedDate = data.CreatedDate,
                    Public = data.Public,
                    Chart = data.ImageContent
                };

                context.Statistics.Add(stat);
                context.SaveChanges();
            }
        }
Esempio n. 2
0
 public StatisticsListElement(Statistics Statistics)
 {
     this.Statistics = Statistics;
 }