public async Task UpdateType(int id, TypOferty typ) { var typx = _context.TypOferty.Find(id); typx.Opis = typ.Opis; _context.Entry(typx).State = EntityState.Modified; await _context.SaveChangesAsync(); }
public async Task <int> insert(ManagementResponse managementResponse) //opis do TypOferty { TypOferty typ = new TypOferty() { Opis = managementResponse.Opis }; await _managementRep.InsertAsync(typ); return((int)typ.IdTypu); }
public async Task <int> UpdateType(int id, ManagementResponse types) { TypOferty typ = new TypOferty { Opis = types.Opis }; try { await _managementRep.UpdateType(id, typ); } catch (Exception e) { return(-1); } return(id); }
public async Task InsertAsync(TypOferty typ) { _context.TypOferty.Add(typ); await _context.SaveChangesAsync(); }