Question: I have incoming bytes of arrays once a time. It kind of looks like this

[10,12,34,58,62]

[83,33,23,44,13]

[10,12,34,58,62]

[34, 77,54,23,87]

[83,33,23,44,13]

[10,12,34,58,62]

[83,33,23,44,66]

[13]
…continues.

So, it renders each array every time. I needed them to be rendered like

[10,12,34,58,62,83,33,23,44,13]

[10,12,34,58,62,34,77,54,23,87,83,33,23,44,13]

[10,12,34,58,62,83,33,23,44,66,13].

The first element will be 10 and the last 13.
Can anyone help me with the code? Thanks in advance.

Answer: 
Meanwhile, your existing code will return `IEnumerable<Tuple<Guid,Guid>>` or `IQueryable<Tuple<Guid,Guid>>`, which un-match with the method return type, `Tuple<Guid,Guid>`.

Assume that you are trying to filter with `mobile`.

You need either of these methods:

* [`.First()`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.first?view=net-6.0)
* [`.Single()`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.single?view=net-6.0)
* [`.FirstOrDefault()`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.firstordefault?view=net-6.0)
* [`.SingleOrDefault()`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.singleordefault?view=net-6.0)

to return (single) result `Tuple<Guid,Guid>`.

```cs
public Tuple<Guid,Guid> GetUserId(string mobile)
{
    return _context.Users
        .Where(u => u.Mobile == mobile)
        .Select(u => new Tuple<Guid,Guid>(u.UserId,u.RoleId))
        .First();
}

```
You have problem with your method defíntion.
Your method's return type is
**Tuple<Guid,Guid>** but you returnig values as **Tuple<Guid,Guid,Boolean>** which it is not matching.

Just update the method return tpye tupple as:

```
public Tuple<Guid,Guid, Boolean> GetUserId(string mobile)
{
    return _context.Users.Select(u => new Tuple<Guid,Guid,Boolean>(u.UserId,u.RoleId,u.Mobile == mobile));
}

```