public void Serialize(BaseAssemblyMetadata target, string path) { using (var context = new DBModelContext()) { context.Assemblies.Add(DBAssemblyMapper.MapToDB(target)); context.SaveChanges(); } }
public void AddMessage(string message) { DBMessage databaseMessage = new DBMessage { MessageString = message }; using (var context = new DBModelContext()) { context.Messages.Add(databaseMessage); context.SaveChanges(); } }
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)); } }