Exemple #1
0
        public ActionResult StudentAdded(BatchEntryVm batchEntryVm)
        {
            Batch batch = batchManager.GetBatchById(batchEntryVm.Id);

            batch.Students = new List <Student>();
            foreach (var student in batchEntryVm.Students)
            {
                batch.Students.Add(batchManager.GetStudentById(student.Id));
            }
            // Batch batch = Mapper.Map<Batch>(batchEntryVm);
            bool isUpdated = batchManager.UpdateBatch(batch);

            return(View("UpdateBatch", batchEntryVm));
        }