internal static UnderlyingSession CreateSession(IFileSystem fs) { var dbSession = new MemoryDatabase(); string dataString = GetCurrentDataString(fs) ?? "[]"; foreach (var blog in JsonConvert.DeserializeObject <IList <BlogDataModel> >(dataString)) { dbSession.Blog.Add(blog); } return(new UnderlyingSession(dbSession)); }
public void Configure(UnderlyingSession session) => _db = session.Get <MemoryDatabase>();