/// <summary> /// 根据指定字段的值是否存在 /// </summary> /// <param name="field">字段名</param> /// <param name="value">值</param> /// <returns>是否存在</returns> public bool Exist(string field, string value) { Member member = new Member(); Type type = member.GetType(); PropertyInfo[] propertyInfos = type.GetProperties(); List <string> propertys = propertyInfos.Select(p => p.Name).ToList(); if (propertys.Contains(field)) { if (field.ToLower() == "email") { return(CurrentRepository.Exist(m => m.Email == value)); } else { return(CurrentRepository.Exist(m => m.Phone_mob == value)); } } return(false); }
public bool Exist(string Name) { return(CurrentRepository.Exist(u => u.RoleName == Name)); }
public bool Login(string name, string password) { return(CurrentRepository.Exist(u => u.name == name && u.password == password)); }
public bool Exist(string userName) { return(CurrentRepository.Exist(u => u.UserName == userName)); }
public bool Exist(string loginName) { return(CurrentRepository.Exist(u => u.LoginName == loginName)); }
public bool Exist(Expression <Func <User, bool> > anyLambda) { return(CurrentRepository.Exist(anyLambda)); }
public bool Exist(string userName) { return(CurrentRepository.Exist(it => it.name == userName)); }