예제 #1
0
        private void HandleCustomSQL(IEntitySqlsMapping sqlsMapping, ISqlCustomizable model)
        {
            var sqlInsert = sqlsMapping.SqlInsert;

            if (sqlInsert != null)
            {
                bool callable = sqlInsert.callableSpecified && sqlInsert.callable;
                model.SetCustomSQLInsert(sqlInsert.Text.LinesToString(), callable, GetResultCheckStyle(sqlInsert));
            }

            var sqlDelete = sqlsMapping.SqlDelete;

            if (sqlDelete != null)
            {
                bool callable = sqlDelete.callableSpecified && sqlDelete.callable;
                model.SetCustomSQLDelete(sqlDelete.Text.LinesToString(), callable, GetResultCheckStyle(sqlDelete));
            }

            var sqlUpdate = sqlsMapping.SqlUpdate;

            if (sqlUpdate != null)
            {
                bool callable = sqlUpdate.callableSpecified && sqlUpdate.callable;
                model.SetCustomSQLUpdate(sqlUpdate.Text.LinesToString(), callable, GetResultCheckStyle(sqlUpdate));
            }
        }
		private void HandleCustomSQL(IEntitySqlsMapping sqlsMapping, ISqlCustomizable model)
		{
			var sqlInsert = sqlsMapping.SqlInsert;
			if (sqlInsert != null)
			{
				bool callable = sqlInsert.callableSpecified && sqlInsert.callable;
				model.SetCustomSQLInsert(sqlInsert.Text.LinesToString(), callable, GetResultCheckStyle(sqlInsert));
			}

			var sqlDelete = sqlsMapping.SqlDelete;
			if (sqlDelete != null)
			{
				bool callable = sqlDelete.callableSpecified && sqlDelete.callable;
				model.SetCustomSQLDelete(sqlDelete.Text.LinesToString(), callable, GetResultCheckStyle(sqlDelete));
			}

			var sqlUpdate = sqlsMapping.SqlUpdate;
			if (sqlUpdate != null)
			{
				bool callable = sqlUpdate.callableSpecified && sqlUpdate.callable;
				model.SetCustomSQLUpdate(sqlUpdate.Text.LinesToString(), callable, GetResultCheckStyle(sqlUpdate));
			}
		}