Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Db4objects.Db4o;
- using Db4objects.Db4o.Linq;
- namespace ConsoleApplication7
- {
- class Program
- {
- static void Main(string[] args)
- {
- IEmbeddedObjectContainer container = Db4oEmbedded.OpenFile("nome_app.yap");
- //Pessoa pessoa = new Pessoa();
- //pessoa.nome = "Julio";
- //pessoa.idade = 13;
- //container.Store(pessoa);
- /*IList<Pessoa> pessoas = container.Query(delegate(Pessoa p)
- {
- return p.idade > 0;
- //return p.nome.StartsWith("P");
- });*/
- //IEnumerable<Pessoa> pessoas = from Pessoa p in container where p.nome.StartsWith("P") || p.nome.StartsWith("M") select p;
- IEnumerable<Pessoa> pessoas = from Pessoa p in container where p.nome.StartsWith("E") select p;
- foreach(Pessoa p in pessoas)
- {
- //p.nome = "Edmiel";
- //container.Store(p);
- //container.Delete(p);
- Console.WriteLine(p.nome);
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement