private static dynamic Get(string id) { var store = new DocumentStore { Url = "http://localhost:8092" }; store.Initialize(); var storage = new RavenPlanStorage(store); var plan = storage.Get(id); return(CreatePlanDto(plan)); }
private static void Post(string id, PlanModel model) { var store = new DocumentStore { Url = "http://localhost:8092" }; store.Initialize(); var storage = new RavenPlanStorage(store); var user = new UserReference { Id = "1", Name = "TEst" }; var plan = storage.Get("6"); var current = plan.Edit(user); current.Name = model.Name; storage.Store(plan); }
private static dynamic Get(string id) { var store = new DocumentStore { Url = "http://localhost:8092" }; store.Initialize(); var storage = new RavenPlanStorage(store); var plan = storage.Get(id); return CreatePlanDto(plan); }