示例#1
0
        public IEnumerable <Routine> Get()
        {
            List <Routine> routines = new List <Routine>();

            foreach (Routine r in db.Routines)
            {
                //routines.Add(r); //Does not work
                routines.Add(ModelCopier.copyRoutine(r)); //Works
            }

            return(routines);

            /*List<Task> tasks = new List<Task>();
             * foreach (Task t in db.Tasks)
             * {
             *  tasks.Add(copyTask(t));
             * }
             * return tasks;*/
        }