public void SaveToDB() { lammy myLammy = lammy.All().FirstOrDefault(x => x.id == _lammyid); myLammy.attunetime = _attunetime; myLammy.description = _description; myLammy.name = _name; myLammy.type = _type; myLammy.validuntil = _validuntil; myLammy.Save(); }
private static Lammy MakeLammyFromDBLammy(lammy inLammy) { Lammy myLammy = new Lammy(); myLammy.LammyID = inLammy.id; myLammy.AttuneTime = inLammy.attunetime; myLammy.Description = inLammy.description; myLammy.Name = inLammy.name; myLammy.Type = inLammy.type; myLammy.ValidUntil = inLammy.validuntil; return(myLammy); }
public static Lammy GetLammyByID(int id) { lammy myLammy = lammy.All().FirstOrDefault(x => x.id == id); return(MakeLammyFromDBLammy(myLammy)); }