public string Get(string setting) { if (setting == "init") { _cueRepository.RemoveAllCues(); _cueRepository.CreateIndex(); _cueRepository.AddCue(new CueMongo { CueId = "1", Question = "What is Melanoma", Answer = "Melanoma is a type of skin cancer", Updated = DateTime.Now, Created = DateTime.Now, Category = new CategoryMongo { Name = "Cancer", CategoryNumber = 1 } }); _cueRepository.AddCue(new CueMongo { CueId = "2", Question = "What is Basal Cell Carcinoma", Answer = "Basal Cell Carcinoma is a type of skin cancer", Updated = DateTime.Now, Created = DateTime.Now, Category = new CategoryMongo { Name = "Cancer", CategoryNumber = 1 } }); return("Database cuesDb was created, and collection 'cues' was filled with 2 sample items"); } return("Unknown"); }
public void Post([FromBody] CueMongo newCue) { _cueRepository.AddCue(new CueMongo { Id = newCue.Id, Question = newCue.Question, Answer = newCue.Answer, Created = DateTime.Now, Updated = DateTime.Now //,UserId = newCue.UserId }); }