Код: Выделить всё
using Test_Site_1.Application.Interfaces.Contexts;
using Test_Site_1.Common.Dto;
using Test_Site_1.Domain.Entities.Products;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Test_Site_1.Application.Services.Products.Commands.AddNewProduct
{
public interface IAddNewProductService
{
ResultDto Execute(RequestAddNewProductDto request);
}
public class AddNewProductService : IAddNewProductService
{
private readonly IDataBaseContext _context;
private readonly IWebHostEnvironment _environment;
public AddNewProductService(IDataBaseContext context, IWebHostEnvironment environment)
{
_context = context;
_environment = environment;
Подробнее здесь: https://stackoverflow.com/questions/785 ... t-core-8-0