OMNI: vorspühlung

This commit is contained in:
Stoyan Zlatev
2024-04-22 09:00:01 +02:00
parent 2333932cd4
commit 9c079f08d2
18 changed files with 592 additions and 19 deletions
@@ -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);
}
}