public void Add(SayWhat request) { using (var session = new DocumentStore { Url = ConfigurationManager.AppSettings["RavenUrl"].ToString(), ApiKey = ConfigurationManager.AppSettings["RavenApiKey"].ToString() }.Initialize().OpenSession()) { session.Store(request); session.SaveChanges(); } }
public void Add(string email, string guid) { using (var session = new DocumentStore { ConnectionStringName = "RavenHQ" }.Initialize().OpenSession()) { session.Store(new RegistrationDocument { Email = email, Guid = guid }); session.SaveChanges(); } }