Пример #1
0
        public async Task <IActionResult> Create([Bind("paragraphID,title,section1,section2,section3")] homeParagraph homeParagraph)
        {
            if (ModelState.IsValid)
            {
                _context.Add(homeParagraph);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(homeParagraph));
        }
        public async Task <IActionResult> Create([Bind("misyonID,title,content")] misyonumuz misyonumuz)
        {
            if (ModelState.IsValid)
            {
                _context.Add(misyonumuz);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(misyonumuz));
        }
        public async Task <IActionResult> Create([Bind("vizyonListID,content")] vizyonList vizyonList)
        {
            if (ModelState.IsValid)
            {
                _context.Add(vizyonList);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(vizyonList));
        }
        public async Task <IActionResult> Create([Bind("adresID,mahalle,sokak,isYeri,No,ilce,sehir")] adress adress)
        {
            if (ModelState.IsValid)
            {
                _context.Add(adress);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(adress));
        }
Пример #5
0
        public async Task <IActionResult> Create([Bind("mapID,stringURL")] maps maps)
        {
            if (ModelState.IsValid)
            {
                _context.Add(maps);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(maps));
        }
Пример #6
0
        public async Task <IActionResult> Create([Bind("mailID,mailAdress")] mail mail)
        {
            if (ModelState.IsValid)
            {
                _context.Add(mail);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(mail));
        }
Пример #7
0
        public async Task <IActionResult> Create([Bind("phoneID,phoneNumber")] phone phone)
        {
            if (ModelState.IsValid)
            {
                _context.Add(phone);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(phone));
        }
Пример #8
0
        public async Task <IActionResult> Create([Bind("haritaID,Adres,x,y,aciklama")] Haritalar haritalar)
        {
            if (ModelState.IsValid)
            {
                _context.Add(haritalar);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(haritalar));
        }
        public async Task <IActionResult> Create(IFormFile file, [Bind("cardID,baslik,aciklama,icerik,imgFile")] homeCards proje)
        {
            if (ModelState.IsValid)
            {
                //save image to wwwroot/image
                createImage(proje);

                //Insert record
                _context.Add(proje);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(proje));
        }
Пример #10
0
        public async Task <IActionResult> Create(IFormFile file, [Bind("projeID,projeAdi,projeBasligi,imgFile,icerik")] proje proje)
        {
            if (ModelState.IsValid)
            {
                //save image to wwwroot/image
                createImage(proje);

                //Insert record
                _context.Add(proje);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(List)));
            }
            return(View(proje));
        }