Beispiel #1
0
        public async Task <ActionResult> Create([Bind(Include = "ID,IconsID,StudysID,Name,Modules")] Lecturer lecturer)
        {
            if (ModelState.IsValid)
            {
                db.Lecturers.Add(lecturer);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(lecturer));
        }
        public async Task <ActionResult> Create([Bind(Include = "ID,LecturersID,Day,Time,Availability,Bookroom")] Icon icon)
        {
            if (ModelState.IsValid)
            {
                db.Icons.Add(icon);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(icon));
        }