This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data; | |
using ClassicDalHelpersSample.Business.Entities; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Snikt; | |
namespace Snikt.Mock | |
{ | |
public sealed class CategoryDataAccess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (IDataReader reader = command.ExecuteReader()) | |
{ | |
List<Category> cats = new List<Category>(); | |
while (reader.Read()) | |
{ | |
int idOrdinal = reader.GetOrdinal("cid"); | |
int nameOrdinal = reader.GetOrdinal("name"); | |
if (!reader.IsDBNull(idOrdinal)) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Snikt.Specifications.DatabaseSpecs | |
{ | |
[TestClass] | |
public class WhenExecuteQuery | |
{ | |
[TestMethod] | |
public void ThenStrongTypedListIsReturned() | |
{ | |
// Biuld | |
string nameOrConnectionString = "name=DefaultConnection"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Document | |
{ | |
private readonly Content html; | |
public Document(Content content) | |
{ | |
html = content; | |
} | |
} |
NewerOlder