public async Task <ActionResult <AossHoca> > PostAossHoca(AossHoca aossHoca) { _context.AossHoca.Add(aossHoca); await _context.SaveChangesAsync(); return(CreatedAtAction("GetAossHoca", new { id = aossHoca.Id }, aossHoca)); }
public async Task <IActionResult> PutAossHoca(long id, AossHoca aossHoca) { if (id != aossHoca.Id) { return(BadRequest()); } _context.Entry(aossHoca).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AossHocaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public long Giris(string mail, string Sifre) { AossHoca a = _context.AossHoca.Where(x => x.Mail == mail && x.Sifre == Sifre).FirstOrDefault(); if (a == null) { return(-1); } else { return(a.Id); } }