public List <UserListDetails> GetUserLists(string storedProcedureName, GridParam gridParam)
        {
            _log.Information("sp call for getting list of user with query {0} {1}", "EXEC " + storedProcedureName, JsonConvert.SerializeObject(gridParam));
            var response = _dapperDao.ExecuteQuery <UserListDetails>(storedProcedureName, gridParam);

            _log.Information("response returned as {0}", JsonConvert.SerializeObject(response));
            return(response);
        }
Esempio n. 2
0
        /// <summary>
        /// Generic Method For CRUD operation
        /// </summary>
        /// <typeparam name="T">Object For Stored Procedure</typeparam>
        /// <param name="spName">Stored Procedure Name</param>
        /// <param name="input">Object For Stored Procedure</param>
        /// <returns>System Response With Code And Messages</returns>
        public SystemResponse ManageData <T>(string spName, T input)
        {
            string procedureName = spName;

            _log.Information("sp call for checking region code with query {0} {1}", "EXEC " + procedureName, JsonConvert.SerializeObject(input));
            var response = _dapperDao.ExecuteQuery <SystemResponse>(procedureName, input);

            _log.Information("response returned as {0}", JsonConvert.SerializeObject(response));
            return(response.FirstOrDefault());
        }
        /// <summary>
        /// Returns all the available roles
        /// </summary>
        /// <returns></returns>
        public List <RoleCommonDetails> GetAvailableRoleLists(string storedProcedureName)
        {
            var param = new
            {
                Flag = "AvailableRoles"
            };

            _log.Information("sp call for getting available roles as with query {0} {1}", "EXEC " + storedProcedureName, JsonConvert.SerializeObject(param));
            var response = _dapperDao.ExecuteQuery <RoleCommonDetails>(storedProcedureName, param);

            _log.Information("response returned as {0}", JsonConvert.SerializeObject(response));
            return(response);
        }
        public ResponseDetails AddCustomerDetails(CustomerDetails customerDetails, string storedProcedureName)
        {
            var response = _dapperDao.ExecuteQuery <ResponseDetails>(storedProcedureName, customerDetails).FirstOrDefault();

            return(response);
        }