Пример #1
0
 public void Serialize(BaseAssemblyMetadata target, string path)
 {
     using (var context = new DBModelContext())
     {
         context.Assemblies.Add(DBAssemblyMapper.MapToDB(target));
         context.SaveChanges();
     }
 }
Пример #2
0
        public void AddMessage(string message)
        {
            DBMessage databaseMessage = new DBMessage
            {
                MessageString = message
            };

            using (var context = new DBModelContext())
            {
                context.Messages.Add(databaseMessage);
                context.SaveChanges();
            }
        }
Пример #3
0
 public BaseAssemblyMetadata Deserialize(string path)
 {
     using (var context = new DBModelContext())
     {
         context.Assemblies.Load();
         context.Namespaces.Load();
         context.Methods.Load();
         context.Parameters.Load();
         context.Properties.Load();
         context.Types.Load();
         var ret = context.Assemblies.First();
         return(DBAssemblyMapper.MapToBase(ret));
     }
 }