public ColorList GetColorFamily(string filePath) { string appPath = AppDomain.CurrentDomain.BaseDirectory; var h = new Wrapper.Helper(); var completePath = Path.Combine(appPath, filePath); var color = h.DeserializeToObject <Wrapper.ColorList>(completePath); return(color); }
public Wrapper.ProductCatalogImport ReadCSV(int sellerId) { string appPath = AppDomain.CurrentDomain.BaseDirectory; var h = new Wrapper.Helper(); // var appPath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath; var filePath = Path.Combine(appPath, "DownloadFile/Downloaded_" + sellerId + ".xml"); //var filePath = HttpContext.Current.Server.MapPath("~/DownloadFile/Downloaded_"+ sellerId + ".xml"); var products = h.DeserializeToObject <Wrapper.ProductCatalogImport>(filePath); return(products); }