public CountryVM Get(int id) { CountryVM model = null; using (CountryOperation operation = new CountryOperation()) { model = new CountryVM { Country = operation.Get(id) }; } try { model.Flag = File.ReadAllBytes(AppConfig.FlagPath + string.Format(model.Country.Flag, AppConfig.FlagResolution)); } catch (DirectoryNotFoundException e) { Log4NetManager.Error("Bayrak klasörü bulunamadı", e); } catch (FileNotFoundException e) { Log4NetManager.Error("Bayrak dosyası bulunamadı", e); } return(model); }