public async Task <int> AddAsync(ProductDTO dto) { using (IProductService rdevSvc = new ProductService()) { var model = ConvserToEntity(dto); //model.Cateory = ObjectExtend.Mapper<CateoryEntity, CateoryDTO>(dto.Cateory); //model.CateoryId = dto.Cateory.Id; return(await Task.Run(() => { return rdevSvc.AddConnChildAsync(model); })); } }