Add Projektauftrag, Readme structured
This commit is contained in:
parent
9720174bfe
commit
e6e797f640
BIN
Generics/Generics.pdf
Normal file
BIN
Generics/Generics.pdf
Normal file
Binary file not shown.
78
Generics/IRepositoryBase.cs
Normal file
78
Generics/IRepositoryBase.cs
Normal file
@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GenericRepository{
|
||||
public interface IRepositoryBase<M>{
|
||||
/// <summary>
|
||||
/// Liefert ein einzelnes Model-Objekt vom Typ M zurück,
|
||||
/// welches anhand dem übergebenen PrimaryKey geladen wird.
|
||||
/// </summary>
|
||||
/// <typeparam name="P">Type des PrimaryKey</typeparam>
|
||||
/// <param name="pkValue">Wert des PrimaryKey</param>
|
||||
/// <returns>gefundenes Model-Objekt, ansonsten null</returns>
|
||||
M GetSingle<P>(P pkValue);
|
||||
|
||||
/// <summary>
|
||||
/// Fügt das Model-Objekt zur Datenbank hinzu (Insert)
|
||||
/// </summary>
|
||||
/// <param name="entity">zu speicherndes Model-Object</param>
|
||||
void Add(M entity);
|
||||
|
||||
/// <summary>
|
||||
/// Löscht das Model-Objekt aus der Datenbank (Delete)
|
||||
/// </summary>
|
||||
/// <param name="entity">zu löschendes Model-Object</param>
|
||||
void Delete(M entity);
|
||||
|
||||
/// <summary>
|
||||
/// Aktualisiert das Model-Objekt in der Datenbank hinzu (Update)
|
||||
/// </summary>
|
||||
/// <param name="entity">zu aktualisierendes Model-Object</param>
|
||||
void Update(M entity);
|
||||
|
||||
/// <summary>
|
||||
/// Gibt eine Liste von Model-Objekten vom Typ M zurück,
|
||||
/// die gemäss der WhereBedingung geladen wurden. Die Werte der
|
||||
/// Where-Bedingung können als separat übergeben werden,
|
||||
/// damit diese für PreparedStatements verwendet werden können.
|
||||
/// (Verhinderung von SQL-Injection)
|
||||
/// </summary>
|
||||
/// <param name="whereCondition">WhereBedingung als string
|
||||
/// z.B. "NetPrice > @netPrice and Active = @active and Description like @desc</param>
|
||||
/// <param name="parameterValues">Parameter-Werte für die Wherebedingung
|
||||
/// bspw: {{"netPrice", 10.5}, {"active", true}, {"desc", "Wolle%"}}</param>
|
||||
/// <returns></returns>
|
||||
List<M> GetAll(string whereCondition, Dictionary<string, object> parameterValues);
|
||||
|
||||
/// <summary>
|
||||
/// Gibt eine Liste aller in der DB vorhandenen Model-Objekte vom Typ M zurück
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<M> GetAll();
|
||||
|
||||
/// <summary>
|
||||
/// Zählt in der Datenbank die Anzahl Model-Objekte vom Typ M, die der
|
||||
/// Where-Bedingung entsprechen
|
||||
/// </summary>
|
||||
/// <param name="whereCondition">WhereBedingung als string
|
||||
/// z.B. "NetPrice > @netPrice and Active = @active and Description like @desc</param>
|
||||
/// <param name="parameterValues">Parameter-Werte für die Wherebedingung
|
||||
/// bspw: {{"netPrice", 10.5}, {"active", true}, {"desc", "Wolle%"}}</param>
|
||||
/// <returns></returns>
|
||||
long Count(string whereCondition, Dictionary<string, object> parameterValues);
|
||||
|
||||
/// <summary>
|
||||
/// Zählt alle Model-Objekte vom Typ M
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
long Count();
|
||||
|
||||
/// <summary>
|
||||
/// Gibt den Tabellennamen zurück, auf die sich das Repository bezieht
|
||||
/// </summary>
|
||||
string TableName { get; }
|
||||
}
|
||||
}
|
BIN
InversionOfControl/InversionOfControl.pdf
Normal file
BIN
InversionOfControl/InversionOfControl.pdf
Normal file
Binary file not shown.
BIN
LINQ/LINQ_LinqToSql.pdf
Normal file
BIN
LINQ/LINQ_LinqToSql.pdf
Normal file
Binary file not shown.
BIN
NuGet/NuGet.pdf
Executable file
BIN
NuGet/NuGet.pdf
Executable file
Binary file not shown.
BIN
ObjectEquality/DuplicateCheckerLib.zip
Normal file
BIN
ObjectEquality/DuplicateCheckerLib.zip
Normal file
Binary file not shown.
BIN
ObjectEquality/Object Equality.pdf
Normal file
BIN
ObjectEquality/Object Equality.pdf
Normal file
Binary file not shown.
42
README.md
42
README.md
@ -0,0 +1,42 @@
|
||||
# Projektaufgabe 6. Semester
|
||||
|
||||
[toc]
|
||||
|
||||
## Abgabetermine
|
||||
|
||||
| Projektaufgabe | Abgabe |
|
||||
| -------------------------- | ----------------------------- |
|
||||
| NuGet | Sonntag, 31. Mai 23:55 |
|
||||
| Object Equality | Montag, 15. Juni 23:55 |
|
||||
| Generics | Dienstag, 30. Juni 23:55 |
|
||||
| LINQ | Samstag, 15. August 23:55 |
|
||||
| RegEx | Sonntag, 30. August 23:55 |
|
||||
| Inversion of Control | Dienstag, 15. September 23:55 |
|
||||
| Reflection & Serialization | Dienstag, 15. September 23:55 |
|
||||
|
||||
## NuGet
|
||||
|
||||
|
||||
|
||||
## Obert Equality
|
||||
|
||||
|
||||
|
||||
## Generics
|
||||
|
||||
|
||||
|
||||
## LINQ
|
||||
|
||||
|
||||
|
||||
## RegEx
|
||||
|
||||
|
||||
|
||||
## Inversion of Control
|
||||
|
||||
|
||||
|
||||
## Reflection & Serialization
|
||||
|
BIN
Reflection_Serialization/Reflection_Serialization.pdf
Normal file
BIN
Reflection_Serialization/Reflection_Serialization.pdf
Normal file
Binary file not shown.
BIN
RegEx/RegEx.pdf
Normal file
BIN
RegEx/RegEx.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user