Ejemplo n.º 1
0
        public async Task <ActionResult <AossHoca> > PostAossHoca(AossHoca aossHoca)
        {
            _context.AossHoca.Add(aossHoca);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetAossHoca", new { id = aossHoca.Id }, aossHoca));
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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);
            }
        }