SQL Server Example

Sep 12, 2016 at 6:15 PM
Edited Sep 13, 2016 at 6:52 PM
May I get an SQL Server CRUD full example ? Thanks.

I downloaded source from here


Getting "Object reference not set to an instance of an object." error here on file SqlServerDataStore.cs

public override bool StoreExists
            var masterInfo = (SqlConnectionInfo)m_info.Clone();   <===== error here
            masterInfo.DatabaseName = "master";

            var masterConnectionString = BuildConnectionString(masterInfo);

            var sql = string.Format("SELECT COUNT(*) FROM sys.databases WHERE Name = '{0}'", m_info.DatabaseName);

EDIT: Never mind, found the issue. I have to use a SqlConnectionInfo and use a SQL login, seems that the trusted connection doesn't work. The m_info is not filled if you use a string connection (weird )