Beispiel #1
0
        public static List <Goal> GetGoalsNotSetInMonth(int idMonth)
        {
            var resGoalOfMonths = GoalOfMonthDao.GetGoalOfMonths(idMonth);
            var res             = SelfJournalDbContext.Instance.Goals.Where(x => !resGoalOfMonths.Select(y => y.IDGoal).Contains(x.ID));

            return(res.ToList());
        }
Beispiel #2
0
        public static void Delete(int id)
        {
            var resGoalOfMonths = GoalOfMonthDao.GetGoalOfMonthsWithIDGoal(id);

            resGoalOfMonths.ForEach(x => GoalOfMonthDao.Delete(x.ID));
            DatabaseDao.Delete(ConstantValue.Goal, new List <string> {
                "ID"
            }, new List <object> {
                id
            });
        }