Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Data.Objects.DataClasses;
- using System.Linq;
- using System.Text;
- namespace SupplierManual.Data
- {
- public class Repository :IRepository
- {
- public IQueryable<TEntity> Queriable<TEntity>() where TEntity : class
- {
- throw new NotImplementedException();
- }
- public void Add<TEntity>(TEntity entity) where TEntity : class
- {
- throw new NotImplementedException();
- }
- public void Update<TEntity>(TEntity entity) where TEntity : class
- {
- throw new NotImplementedException();
- }
- public void Delete<TEntity>(TEntity entity) where TEntity : class
- {
- throw new NotImplementedException();
- }
- public void Dispose()
- {
- throw new NotImplementedException();
- }
- public void SaveChange()
- {
- throw new NotImplementedException();
- }
- private bool HasBaseType(Type type, out Type baseType)
- {
- Type originalType = type.GetType();
- baseType = GetBaseType(type);
- return baseType != originalType;
- }
- private Type GetBaseType(Type type)
- {
- Type baseType = type.BaseType;
- if (baseType != null && baseType != typeof(EntityObject))
- {
- return GetBaseType(type.BaseType);
- }
- return type;
- }
- }
- }
Add Comment
Please, Sign In to add comment