Esempio n. 1
0
        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));
        }
Esempio n. 2
0
 public void Configure(UnderlyingSession session) => _db = session.Get <MemoryDatabase>();