public override void Merge(T obj)
 {
     if (Loader.Any(d => d.Id.Equals(obj.Id)))
     {
         Update(obj);
     }
     else
     {
         Add(obj);
     }
 }
Example #2
0
 public bool EmailExists(string email)
 {
     return(Loader.Any(d => d.Email == email));
 }
Example #3
0
 public virtual bool NameExists(string logonName)
 {
     return(Loader.Any(d => d.LogonName == logonName));
 }
Example #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));
 }
 public override bool IdExists(object ob)
 {
     return(Loader.Any(d => d.Id.Equals(ob)));
 }