/// <summary> /// EDIT ACTION for PracticeKata modeled data /// </summary> /// <param name="practiceKata"></param> public void Edit(PracticeKata practiceKata) { _practiceKatas.Collection.Update( Query.EQ("_id", practiceKata.PracticeKataId), Update.Set("Date", practiceKata.Date) .Set("KataChallengeId", practiceKata.KataChallengeId) .Set("User", practiceKata.Author) .Set("KataCode", practiceKata.KataCode) .Set("KataTimeSpan", practiceKata.KataTimeSpan)); }
/// <summary> /// CREATE ACTION for PracticeKata modeled data /// </summary> /// <param name="practiceKata"></param> public void Create(PracticeKata practiceKata) { practiceKata.Comments = new List<Comment>(); _practiceKatas.Collection.Save(practiceKata); }