コード例 #1
0
        static void Main(string[] args)
        {
            //暖机操作,需要预热
            using (DataBaseContext dbContext = new DataBaseContext())
            {
                var objectContext = ((IObjectContextAdapter)dbContext).ObjectContext;

                var mappingCollection =
                    (StorageMappingItemCollection)objectContext.MetadataWorkspace.GetItemCollection(DataSpace.CSSpace);
                mappingCollection.GenerateViews(new List <EdmSchemaError>());
            }

            IBase_UserInfoService service  = BusinessLogicLayerContainer.Resolve <IBase_UserInfoService>();
            Base_UserInfo         userInfo = new Base_UserInfo()
            {
                User_Account = "sa"
            };

            Console.WriteLine(DateTime.Now);
            var data   = service.GetUserInfoByAccount(userInfo);
            var result = JsonConvert.SerializeObject(data);

            Console.WriteLine(result);
            Console.WriteLine(DateTime.Now);
            Console.ReadLine();
        }
コード例 #2
0
 public EngineerController()
 {
     service = BusinessLogicLayerContainer.Resolve <IEngineeringService>();
 }