public Challenge Add(ChallengeInputModel challenge) { var entry = new Challenge() { Name = challenge.Name, Description = challenge.Description, StartDate = challenge.StartDate, MinimumWordsRestriction = challenge.MinimumWordsRestriction, Reward = challenge.Reward }; return this.dbContext.Challenges.Add(entry); }
public Challenge Delete(Challenge challenge) { return this.dbContext.Challenges.Remove(challenge); }
public void Update(Challenge challenge) { this.dbContext.Entry(challenge).State = EntityState.Modified; }