public async Task <Offices2RoomsEntity> Update(Offices2RoomsEntity entity) { var updateEntity = _coworkingDBContext.Offices2Rooms.Update(entity); await _coworkingDBContext.SaveChangesAsync(); return(updateEntity.Entity); }
public async Task <Offices2RoomsEntity> Add(Offices2RoomsEntity entity) { await _coworkingDBContext.Offices2Rooms.AddAsync(entity); await _coworkingDBContext.SaveChangesAsync(); return(entity); }
public async Task <Offices2RoomsEntity> Update(int idEntity, Offices2RoomsEntity updateEnt) { var entity = await Get(idEntity); entity.RoomId = updateEnt.RoomId; _coworkingDBContext.Offices2Rooms.Update(entity); await _coworkingDBContext.SaveChangesAsync(); return(entity); }