public void GetCompanyById_Sql() { var operation = new DbCommandOperation <Company, GetCompanyById_Sql>("Local"); Company _result = operation.ExecuteSingleReader(new GetCompanyById_Sql() { Id = 1 }); }
public void GetCompanyById() { // NOTE: // Each construction of DbCommandOperation means it does initializion on first call. // when using multiple times it's best to set the declaration on class level instead of method level. var operation = new DbCommandOperation <Company, GetCompanyById>("Local"); Company _result = operation.ExecuteSingleReader(new GetCompanyById() { Id = 1 }); }