Guest User

Untitled

a guest
Feb 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.52 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data.Objects.DataClasses;
  4. using System.Linq;
  5. using System.Text;
  6.  
  7. namespace SupplierManual.Data
  8. {
  9.     public class Repository :IRepository
  10.     {
  11.         public IQueryable<TEntity> Queriable<TEntity>() where TEntity : class
  12.         {
  13.             throw new NotImplementedException();
  14.         }
  15.  
  16.         public void Add<TEntity>(TEntity entity) where TEntity : class
  17.         {
  18.             throw new NotImplementedException();
  19.         }
  20.  
  21.         public void Update<TEntity>(TEntity entity) where TEntity : class
  22.         {
  23.             throw new NotImplementedException();
  24.         }
  25.  
  26.         public void Delete<TEntity>(TEntity entity) where TEntity : class
  27.         {
  28.             throw new NotImplementedException();
  29.         }
  30.  
  31.         public void Dispose()
  32.         {
  33.             throw new NotImplementedException();
  34.         }
  35.  
  36.         public void SaveChange()
  37.         {
  38.             throw new NotImplementedException();
  39.         }
  40.  
  41.         private bool HasBaseType(Type type, out Type baseType)
  42.         {
  43.             Type originalType = type.GetType();
  44.             baseType = GetBaseType(type);
  45.             return baseType != originalType;
  46.         }
  47.  
  48.         private Type GetBaseType(Type type)
  49.         {
  50.             Type baseType = type.BaseType;
  51.             if (baseType != null && baseType != typeof(EntityObject))
  52.             {
  53.                 return GetBaseType(type.BaseType);
  54.             }
  55.             return type;
  56.         }
  57.  
  58.     }
  59.  
  60. }
Add Comment
Please, Sign In to add comment