Skip to content

Tag: SQL

C#/.NET 0

Improvements on the SqlXmlSerialiser

This is a followup to the last article Easy Conversion from Enterprise Architect XML SQL Queries to C# Objects. Every time we execute a query that returns results from more than one table we have to use aliasing in the SQL statement to differentiate columns with the same name. See below a query that retrieves all connectors of an element […]

C#/.NET 1

Easy Conversion from Enterprise Architect XML SQL Queries to C# Objects

In this article I show you how to easily convert arbitrary SQL query results in Enterprise Architect to native C# objects. The Enterprise Architect object model provides several methods which you can use to make direct SQL queries against the underlying database. And while Repository.GetElementSet really returns a Collection of native EA.Elements (but not connectors) the more versatile Repository.SQLQuery only […]

C#/.NET 0

ODataQueryOptions do not correctly apply $filter and $orderby Options to IQueryable when using EntityFramework 6 with SQL Server

This blog post is a bit more lengthly than my usual posts and the idea came from an issue I faced when working in one of our project where we use an OData v3 REST interface that talks to an MS SQL Server (2012 R2) via EntityFramework v6.1.3. In short: we wanted to implement ‘entity framework row level security’ (in […]

PowerShell 1

Module: biz.dfch.PS.System.Data

This module provides Cmdlets that let you work with Microsoft SQL Server database (regular and LocalDB) by utilising System.Data.SqlClient (instead of relying on the buggy ‘SqlServerCmdletSnapin100’ snapin and its ‘Invoke-Sqlcmd’ implementation. You can set a ‘DefaultPrefix’ or an alias to call it the same as the Microsoft SQL Server supplied ‘Invoke-Sqlcmd’. Furthermore you can work with LocalDB instances (as used […]

PowerShell 1

[biz.dfch.PS.System.Data] Invoke-SqlCmd without the overhead

=== UPDATE 2014-10-19 === I created a separate module that uses the SqlClient where you do not have to specify the command type and where you can also use LocalDB connections. === For the full module and description see my Post Module: biz.dfch.PS.System.Data. === UPDATE 2013-12-21 === added an additional parameter to specify the command type manually === Sometimes we […]