首页 > 代码库 > 基本类-ContextFactory

基本类-ContextFactory

基本类实现Context:

    public class ContextFactory    {        private static DbContext context;        public static DbContext Get()        {            if (null == context)            {                context = new AutoDeskEntities() as DbContext;            }            return context;        }    }

  

基本类-ContextFactory