aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio_v2/Tango.DAL/IRepository.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio_v2/Tango.DAL/IRepository.cs')
-rw-r--r--Software/Visual_Studio_v2/Tango.DAL/IRepository.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Software/Visual_Studio_v2/Tango.DAL/IRepository.cs b/Software/Visual_Studio_v2/Tango.DAL/IRepository.cs
new file mode 100644
index 000000000..a6d6989dd
--- /dev/null
+++ b/Software/Visual_Studio_v2/Tango.DAL/IRepository.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.DAL
+{
+ public interface IRepository : IDisposable
+ {
+
+ }
+
+ public interface IRepository<T> : IRepository where T : Entity
+ {
+ Task<List<T>> GetAsync(Expression<Func<T, bool>> filter);
+ Task<List<T>> GetAllAsync();
+ Task<T> ReplaceAsync(T entity);
+ Task<long> DeleteAsync(Expression<Func<T, bool>> filter);
+ Task<T> Insert(T entity);
+ Task<long> Count();
+ Task<long> Count(Expression<Func<T, bool>> filter);
+ }
+}