public void PostDeleteMethod(int id) { using (var Filerepo = new TestResultRepository()) { if (id != 0) { Result _file = Filerepo.GetById(id); Filerepo.Delete(_file); } } }
public string Header(int id) { var Filerepo = new TestResultRepository(); var fileRecord = Filerepo.GetById(id); var cd = new System.Net.Mime.ContentDisposition { FileName = fileRecord.FileName, Inline = false, }; return(cd.ToString()); }
public Result Find(int id) { var Filerepo = new TestResultRepository(); return(Filerepo.GetById(id)); }