mercredi 8 avril 2015

Joining two records with the same key


Vote count:

0




Let's say I have these two objects:



public class Employee : Person
{
public string Something { get; set; }
}

public class Person
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}


Now I have to deal with a given database schema, that looks like follows:



CREATE TABLE employee (
id INTEGER PRIMARY KEY,
something TEXT
);

CREATE TABLE person (
id INTEGER PRIMARY KEY,
firstname TEXT,
lastname TEXT
);


(Both share the same id, so they can be joined together to a single record in a query.)


Question: Do I have a chance to get this resolved by sqlite-net with SQLite-Net Extensions? And if so: how would that work?



asked 57 secs ago

asp_net

1,586






Joining two records with the same key

Aucun commentaire:

Enregistrer un commentaire