OMNI: vorspühlung
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
namespace LaaProduction.Data.SQL.Interfaces
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public interface ISQLCommand
|
||||
{
|
||||
int ExecuteNonQuery();
|
||||
|
||||
IEnumerable<T> ExecuteReader<T>(Func<ISQLReader, T> expression);
|
||||
|
||||
T ExecuteScalar<T>(Func<ISQLReader, T> expression);
|
||||
|
||||
T FirstOrDefault<T>(Func<ISQLReader, T> expression);
|
||||
|
||||
ISQLCommand SetParameter(string name, object value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace LaaProduction.Data.SQL.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="ISQLConnection"/> simply exposes the <see cref="ISQLConnection.CreateCommand(string)"/> method.
|
||||
/// </summary>
|
||||
public interface ISQLConnection
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a command with given command text.
|
||||
/// </summary>
|
||||
/// <param name="commandText"><see cref="System.String"/> - SQL query string.</param>
|
||||
/// <returns></returns>
|
||||
ISQLCommand CreateCommand(string commandText);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace LaaProduction.Data.SQL.Interfaces
|
||||
{
|
||||
using System;
|
||||
|
||||
public interface ISQLReader
|
||||
{
|
||||
T GetValue<T>();
|
||||
|
||||
object GetValue(string column);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user