Horje
C# MemoryStream - Timeouts are not supported on this stream Code Example
C# MemoryStream - Timeouts are not supported on this stream
    [System.Web.Http.HttpGet]
    [System.Web.Http.Route("export-to-csv")]
    public FileStreamResult ExportDeposits([FromUri(Name = "")]DepositSearchParamsVM depositSearchParamsVM)
    {
        if (depositSearchParamsVM == null)
        {
            depositSearchParamsVM = new DepositSearchParamsVM();
        }
        var records = _DepositsService.SearchDeposits(depositSearchParamsVM);
        var result = _DepositsService.WriteCsvToMemory(records);
        var memoryStream = new MemoryStream(result);
        Response.ContentType = new MediaTypeHeaderValue("application/octet-stream").ToString();// Content type
        return new FileStreamResult(memoryStream, "text/csv") { FileDownloadName = "export.csv" };
    }




Csharp

Related
ExecuteResultAsync Code Example ExecuteResultAsync Code Example
unity break if statement Code Example unity break if statement Code Example
car Code Example car Code Example
c# is not Code Example c# is not Code Example
dispathcer in wpf stack overflow Code Example dispathcer in wpf stack overflow Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10