public void SaveToDB() { feat myFeat = feat.All().FirstOrDefault(x => x.id == _id); myFeat.description = _description; myFeat.grantsarmour = _grantsarmour; myFeat.grantsbody = _grantsbody; myFeat.grantsmana = _grantsmana; myFeat.maxtimes = _maxtimes; myFeat.name = _name; myFeat.prerequisiterace = _prerequisiterace; myFeat.prerequisites = _prerequisites; myFeat.Save(); }
private static Feat MakeFeatFromDBFeat(feat inFeat) { Feat myFeat = new Feat(); myFeat.Description = inFeat.description; myFeat.FeatID = inFeat.id; myFeat.GrantsArmour = inFeat.grantsarmour; myFeat.GrantsBody = inFeat.grantsbody; myFeat.GrantsMana = inFeat.grantsmana; myFeat.MaxTimes = inFeat.maxtimes; myFeat.Name = inFeat.name; myFeat.PrerequisiteRace = inFeat.prerequisiterace; myFeat.PreRequisites = inFeat.prerequisites; return(myFeat); }
public static Feat GetFeatByID(int id) { feat myFeat = feat.All().FirstOrDefault(x => x.id == id); return(MakeFeatFromDBFeat(myFeat)); }