예제 #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));
        }