Fix Post method exception
This commit is contained in:
parent
da94ed6d89
commit
402ffae02d
@ -45,7 +45,7 @@ namespace RhSolutions.Api.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
return Ok(products);
|
return Ok();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -5,19 +5,6 @@ namespace RhSolutions.Api.Services
|
|||||||
{
|
{
|
||||||
public class ClosedXMLParser : IPricelistParser
|
public class ClosedXMLParser : IPricelistParser
|
||||||
{
|
{
|
||||||
// HttpContext? context;
|
|
||||||
// XLWorkbook? wb;
|
|
||||||
|
|
||||||
// public ClosedXMLParser(IHttpContextAccessor accessor)
|
|
||||||
// {
|
|
||||||
// this.context = accessor.HttpContext;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public void Dispose()
|
|
||||||
// {
|
|
||||||
// wb?.Dispose();
|
|
||||||
// }
|
|
||||||
|
|
||||||
public async IAsyncEnumerable<Product> GetProducts(HttpContext context)
|
public async IAsyncEnumerable<Product> GetProducts(HttpContext context)
|
||||||
{
|
{
|
||||||
using (var memoryStream = new MemoryStream())
|
using (var memoryStream = new MemoryStream())
|
||||||
@ -45,13 +32,6 @@ namespace RhSolutions.Api.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// private async Task<XLWorkbook> GetWorkbook(HttpContext context)
|
|
||||||
// {
|
|
||||||
// using var memoryStream = new MemoryStream();
|
|
||||||
// return ;
|
|
||||||
// }
|
|
||||||
|
|
||||||
private IXLTable GetTable(XLWorkbook wb)
|
private IXLTable GetTable(XLWorkbook wb)
|
||||||
{
|
{
|
||||||
var ws = wb.Worksheets.First();
|
var ws = wb.Worksheets.First();
|
||||||
|
Loading…
Reference in New Issue
Block a user