public EvenementImage UploadAndCreate(HttpPostedFileBase file) { var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Images", file.FileName); File.UploadHttpFile(file, path); var evtImage = new EvenementImage() { Title = file.FileName, Path = path }; evtImageRepository.Create(evtImage); return(evtImage); }