예제 #1
0
 public override void Merge(T obj)
 {
     if (Loader.Any(d => d.Id.Equals(obj.Id)))
     {
         Update(obj);
     }
     else
     {
         Add(obj);
     }
 }
예제 #2
0
 public bool EmailExists(string email)
 {
     return(Loader.Any(d => d.Email == email));
 }
예제 #3
0
 public virtual bool NameExists(string logonName)
 {
     return(Loader.Any(d => d.LogonName == logonName));
 }
예제 #4
0
 /// <summary>
 /// if records in the repository with the given createria exists
 /// </summary>
 /// <param name="exp"></param>
 /// <returns></returns>
 public virtual bool Exist(Expression <Func <T, bool> > exp)
 {
     return(Loader.Any(exp));
 }
예제 #5
0
 public override bool IdExists(object ob)
 {
     return(Loader.Any(d => d.Id.Equals(ob)));
 }