public void Post([FromBody] ValueParam newvalue) { _valueRepository.AddValue(new Value { Id = newvalue.Id, Body = newvalue.Body, // InternalId = newvalue.InternalId, // Name = newvalue.Name, // UpdatedOn = newvalue.UpdatedOn, // CreatedOn = newvalue.CreatedOn }); }
public string Get(string setting) { if (setting == "init") { _ValueRepository.RemoveAllValues(); _ValueRepository.AddValue(new Value() { Id = "1", Body = "Test Value 1", CreatedOn = DateTime.Now, UpdatedOn = DateTime.Now, }); _ValueRepository.AddValue(new Value() { Id = "2", Body = "Test Value 2", CreatedOn = DateTime.Now, UpdatedOn = DateTime.Now, }); _ValueRepository.AddValue(new Value() { Id = "3", Body = "Test Value 3", CreatedOn = DateTime.Now, UpdatedOn = DateTime.Now, }); _ValueRepository.AddValue(new Value() { Id = "4", Body = "Test Value 4", CreatedOn = DateTime.Now, UpdatedOn = DateTime.Now, }); return("Done"); } return("Unknown"); }