Пример #1
0
        } // Map function closer

        public List <SqlParameter> MapParamsForUpsert(CompanyData entity) => new List <SqlParameter>
        {
            BuildParam("@company_key", entity.CompanyKey),
            BuildParam("@company_code", entity.CompanyCode),
            BuildParam("@company_name", entity.CompanyName),
            BuildParam("@company_desc", entity.CompanyDesc),
            GetOutParam()
        };
        public IEnumerable <AccountData> GetAll(CompanyData company)
        {
            Log.LogInformation("Accessing AccountRepo GetAll function");
            var pcol = new List <SqlParameter>()
            {
                Mapper.BuildParam("@company_key", company.CompanyKey)
            };

            using (entityContext) return(MapRows(entityContext.ExecuteProcedureAsSqlDataReader("usp_account_all_by_company", pcol)));
        }
        public IEnumerable <PersonData> GetAllReps(CompanyData comp, int rep_type)
        {
            Log.LogInformation("Accessing PersonRepo GetAllReps by Company function");
            var pcol = new List <SqlParameter>()
            {
                Mapper.BuildParam("@company_key", comp.CompanyKey),
                Mapper.BuildParam("@rep_type", rep_type)
            };

            using (entityContext) return(MapRows(entityContext.ExecuteProcedureAsSqlDataReader("usp_person_all_by_company_reponly", pcol)));
        }
Пример #4
0
 public List <SqlParameter> MapParamsForDelete(CompanyData entity) => MapParamsForDelete(entity.CompanyKey);