/// <summary>
        ///
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <returns></returns>
        public static DbDataReader Select(MembershipAuthorizationEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var reader = KandaTableDataGateway._factory.CreateReader(connection, transaction);

            reader.CommandText = @"usp_SelectMembershipAuthorizations";

            KandaDbDataMapper.MapToParameters(reader, entity);

            reader.ExecuteReader();

            return(reader);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <returns></returns>
        public static DbDataReader Select(MembershipAuthorizationEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var reader = KandaTableDataGateway._factory.CreateReader(connection, transaction);

            reader.CommandText = @"usp_SelectMembershipAuthorizations";

            KandaDbDataMapper.MapToParameters(reader, entity);

            reader.ExecuteReader();

            return reader;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <returns></returns>
        public static int Update(MembershipAuthorizationEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var command = KandaTableDataGateway._factory.CreateCommand(connection, transaction);

            command.CommandText = @"usp_UpdateMembershipAuthorizations";

            KandaDbDataMapper.MapToParameters(command, entity);

            var result = KandaTableDataGateway._factory.CreateParameter(KandaTableDataGateway.RETURN_VALUE, DbType.Int32, sizeof(int), ParameterDirection.ReturnValue, DBNull.Value);
            command.Parameters.Add(result);

            command.ExecuteNonQuery();

            return (int)result.Value;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="connection"></param>
        /// <param name="transaction"></param>
        /// <returns></returns>
        public static int Update(MembershipAuthorizationEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var command = KandaTableDataGateway._factory.CreateCommand(connection, transaction);

            command.CommandText = @"usp_UpdateMembershipAuthorizations";

            KandaDbDataMapper.MapToParameters(command, entity);

            var result = KandaTableDataGateway._factory.CreateParameter(KandaTableDataGateway.RETURN_VALUE, DbType.Int32, sizeof(int), ParameterDirection.ReturnValue, DBNull.Value);

            command.Parameters.Add(result);

            command.ExecuteNonQuery();

            return((int)result.Value);
        }
        public IEnumerable<MembershipAuthorizationEntity> Get(MembershipAuthorizationEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var reader = default(DbDataReader);

            try
            {
                reader = MembershipAuthorizationsGateway.Select(entity, connection, transaction);

                var entities = KandaDbDataMapper.MapToEnumerable<MembershipAuthorizationEntity>(reader);

                return entities;
            }
            finally
            {
                if (reader != null) { reader.Close(); }
            }
        }
示例#6
0
        public IEnumerable <MembershipAuthorizationEntity> Get(MembershipAuthorizationEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var reader = default(DbDataReader);

            try
            {
                reader = MembershipAuthorizationsGateway.Select(entity, connection, transaction);

                var entities = KandaDbDataMapper.MapToEnumerable <MembershipAuthorizationEntity>(reader);

                return(entities);
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }
        }
        public bool Update(MembershipAuthorizationEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var count = MembershipAuthorizationsGateway.Update(entity, connection, transaction);

            return (count == 1);
        }
示例#8
0
        public bool Update(MembershipAuthorizationEntity entity, DbConnection connection, DbTransaction transaction)
        {
            var count = MembershipAuthorizationsGateway.Update(entity, connection, transaction);

            return(count == 1);
        }