public async Task <ActionResult <AossOgrenci> > PostAossOgrenci(AossOgrenci aossOgrenci) { _context.AossOgrenci.Add(aossOgrenci); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetAossOgrenci), new { id = aossOgrenci.Id }, aossOgrenci)); }
public async Task <IActionResult> PutAossOgrenci(long id, AossOgrenci aossOgrenci) { if (id != aossOgrenci.Id) { return(BadRequest()); } _context.Entry(aossOgrenci).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AossOgrenciExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public long Giris(int OgrenciNo, string Sifre) { AossOgrenci a = _context.AossOgrenci.Where(x => x.OgrenciNo == OgrenciNo && x.Sifre == Sifre).FirstOrDefault(); if (a == null) { return(-1); } else { return(a.Id); } }