Commit inicial: ITCA_API_SAP_WMS (.NET Core 3.1)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
2b82744eb8
168 files changed
+11066
No files matched your search
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Net.Connection
|
||||
{
|
||||
public abstract class RepositoryBase<T> : IRepositoryBase<T> where T : class
|
||||
{
|
||||
protected IConnectionSQL context { get; set; }
|
||||
|
||||
public RepositoryBase(IConnectionSQL context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
public IEnumerable<T> FindAll(T entity, string storeProcedure)
|
||||
{
|
||||
return context.ExecuteSqlViewAll<T>(storeProcedure, entity);
|
||||
}
|
||||
|
||||
public IEnumerable<T> FindByCondition(object entity, string storeProcedure)
|
||||
{
|
||||
return context.ExecuteSqlViewFindByCondition<T>(storeProcedure, entity);
|
||||
}
|
||||
|
||||
public T FindById(object entity, string storeProcedure)
|
||||
{
|
||||
return context.ExecuteSqlViewId<T>(storeProcedure, entity);
|
||||
}
|
||||
|
||||
public int Create(object entity, string storeProcedure)
|
||||
{
|
||||
return (int)context.ExecuteSqlInsert<T>(storeProcedure, entity);
|
||||
}
|
||||
|
||||
public void Delete(T entity, string storeProcedure)
|
||||
{
|
||||
context.ExecuteSqlDelete<T>(storeProcedure, entity);
|
||||
}
|
||||
|
||||
public void Update(object entity, string storeProcedure)
|
||||
{
|
||||
this.context.ExecuteSqlUpdate<T>(storeProcedure, entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user