public static void Main(string[] args) { //configurare jurnalizare folosind log4net XmlConfigurator.Configure(new System.IO.FileInfo(args[0])); Console.WriteLine("Configuration Settings for tasksDB {0}", GetConnectionStringByName("tasksDB")); IDictionary <String, string> props = new SortedList <String, String>(); props.Add("ConnectionString", GetConnectionStringByName("tasksDB")); Console.WriteLine("Sorting Tasks Repository DB ..."); SortingTaskDbRepository repo = new SortingTaskDbRepository(props); Console.WriteLine("Taskurile din db"); foreach (SortingTask t in repo.findAll()) { Console.WriteLine(t); } SortingTask task = repo.findOne(4); repo.delete(4); task.Description = "Ana are pere"; repo.save(task); Console.WriteLine("Taskurile din db dupa stergere/adaugare"); foreach (SortingTask t in repo.findAll()) { Console.WriteLine(t); } }
public static void Main(string[] args) { //Console.WriteLine ("Hello World!"); XmlConfigurator.Configure(new System.IO.FileInfo(args[0])); Console.WriteLine("Sorting Tasks Repository DB ..."); SortingTaskDbRepository repo = new SortingTaskDbRepository(); Console.WriteLine("Taskurile din db"); foreach (SortingTask t in repo.findAll()) { Console.WriteLine(t); } SortingTask task = repo.findOne(4); repo.delete(4); task.Description = "Ana are mere"; repo.save(task); Console.WriteLine("Taskurile din db dupa stergere/adaugare"); foreach (SortingTask t in repo.findAll()) { Console.WriteLine(t); } }