Ejemplo n.º 1
0
        void PostResourceProgress(LearningPlan learning)
        {
            if (learning.ResourceProgresses == null)
            {
                learning.ResourceProgresses = new List <ResourceProgress>();
            }
            foreach (ResourceProgress rp in learning.ResourceProgresses)
            {
                userprofile.RP.Add(rp);
                //  PostResourceProgress(cl);
            }

            userprofile.SaveChanges();
        }
Ejemplo n.º 2
0
        public void PutNote(string id, LearningPlan learningPlan)
        {
            User retrievedNote = userprofile.Use.FirstOrDefault(n => n.UserId == id);

            //LearningPlan learn=new LearningPlan();
            if (retrievedNote != null)
            {
                //  var user = not.use.Find(userParam.Id);
                if (retrievedNote.learningPlans == null)
                {
                    retrievedNote.learningPlans = new List <LearningPlan>();
                }

                retrievedNote.learningPlans.Add(learningPlan);
                // not.Stu.Add(note);
                userprofile.SaveChanges();
                // return true;
            }
            // }
            // else{
            //     return false;
            // }
        }