Пример #1
0
        public void GetDBResults()
        {
            //create an instance of the dbcontext
            SampleEntities sampleEntities = new SampleEntities(new Microsoft.EntityFrameworkCore.DbContextOptions <SampleEntities>());


            //setting up parameters
            UserParam1 param1 = new UserParam1()
            {
                UserId = 1
            };

            var spParams = _parameterMapper.Map(param1);

            //method one
            var results1 = sampleEntities.QueryMultipleResults(sql: "YOUR_STORE_PROC_NAME").ExecuteMultipleResults(spParams.Parameters, typeof(Result1), typeof(Result2));
        }