Example #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<FeeScheduleData> GetAll(AccountData account)
        //{
        //    Log.LogInformation("Accessing FeeScheduleRepo GetAll by Account function");
        //    var pcol = new List<SqlParameter>() { Mapper.BuildParam("@account_key", account.AccountKey) };
        //    using (entityContext) return MapRows(entityContext.ExecuteProcedureAsSqlDataReader("usp_fee_schedule_all_by_account", pcol));
        //}

        public IEnumerable <FeeScheduleData> GetAll(CompanyData company)
        {
            Log.LogInformation("Accessing FeeScheduleRepo GetAll by Company function");
            var pcol = new List <SqlParameter>()
            {
                Mapper.BuildParam("@account_key", company.CompanyKey)
            };

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

            using (entityContext) return(MapRows(entityContext.ExecuteProcedureAsSqlDataReader("usp_person_all_by_company", pcol)));
        }
Example #4
0
 public List <SqlParameter> MapParamsForDelete(CompanyData entity) => MapParamsForDelete(entity.CompanyKey);