public CheckValidUser_Result CheckValidUserName(string Name) { try { using (var db = new DBEntities()) { var Data = db.CheckValidUser(Name).FirstOrDefault(); return(Data); } } catch (Exception) { return(null); throw; } }