asp.net - Passing string from Startup.cs method to database -


i have problem have websocket method in startup.cs class in asp.net core rc1 project.

    private async task echo(websocket websocket)     {         var buffer = new byte[1024 * 4];         var result = await websocket.receiveasync(new arraysegment<byte>(buffer), cancellationtoken.none);         string text = "";         while (!result.closestatus.hasvalue)         {             await websocket.sendasync(new arraysegment<byte>(buffer, 0, result.count), result.messagetype, result.endofmessage, cancellationtoken.none);             result = await websocket.receiveasync(new arraysegment<byte>(buffer), cancellationtoken.none);              (int = 0; < result.count; i++)             {                 text += (char) buffer[i];             }             /*               todo: add {text} database               */             text = text ?? "";         }         await websocket.closeasync(result.closestatus.value, result.closestatusdescription, cancellationtoken.none);     } 

and need pass variable text database via entity framework 7, have problem that. how can that?


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -