public BookQueueResponse ProcessSingleBookForMongo(IMXEntity message) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("-----------------Start ProcessSingleBookForMongo() ...-----------------"); var entity = message as Book; var id = _pcRepository.Insert<Book>(entity); Console.WriteLine("New Document inserted with Id : " + id); Console.WriteLine("\n-----------------Processing Complete..-----------------"); Console.ResetColor(); return new BookQueueResponse { Id = id }; }
public void ProcessClient(IMXEntity message) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("-----------------Processing now...-----------------"); var client = message as Client; if (client != null) { var result = _bRepository.Insert <Client>(client); Console.WriteLine("New Client Created with Id : " + result); } Console.WriteLine("\n-----------------Processing Complete..-----------------"); Console.ResetColor(); }
public void ProcessClient(IMXEntity message) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("-----------------Processing now...-----------------"); var client = message as Client; if (client != null) { var result = _bRepository.Insert<Client>(client); Console.WriteLine("New Client Created with Id : " + result); } Console.WriteLine("\n-----------------Processing Complete..-----------------"); Console.ResetColor(); }
public BookQueueResponse ProcessSingleBookForMongo(IMXEntity message) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("-----------------Start ProcessSingleBookForMongo() ...-----------------"); var entity = message as Book; var id = _pcRepository.Insert <Book>(entity); Console.WriteLine("New Document inserted with Id : " + id); Console.WriteLine("\n-----------------Processing Complete..-----------------"); Console.ResetColor(); return(new BookQueueResponse { Id = id }); }
public void SetDocumentDefaults(IMXEntity entity) { entity.Version = entity.Version + 1; entity.CreatedBy = CurrentUser; entity.CreatedDate = CurrentDate; }