Exemplo n.º 1
0
        private bool DbContainsItem(BAGData item)
        {
            bool result = false;

            using (var db2 = new GRadarModel())
            {
                var data = from d in db2.BAGDataList select d;

                if (data.Count() > 0 && data.Select(x => x.Canton == item.Canton && x.Year == item.Year && x.Month == item.Month && x.Week == item.Week).Count() > 0)
                {
                    result = true;
                }



                return(result);
            }
        }
Exemplo n.º 2
0
 public void SaveData(BAGData item)
 {
     db.BAGDataList.Add(item);
 }