/// <summary> /// Return all User synonyms for a user's list id "uListUserId" /// </summary> /// <param name="user"></param> /// <returns>List of BlissBase.Model.UserSynonym or null</returns> public List<UserSynonym> GetSynonymForUser(UserSynonymList user) { List<UserSynonym> allSynonymsForUser = new List<UserSynonym>(); using (var db = new BlissBaseContext(testing)) { allSynonymsForUser = db.UserSynonyms.Where(uS => uS.UserID == user.uListUserId).Select( uS => new UserSynonym { uSynId = uS.USynID, uSynWord = uS.USynWord, uSynSynonym = uS.USynSynonym, uListUserId = uS.UserID, uSynApproved = uS.USynApproved }).ToList(); } return allSynonymsForUser.Count == 0 ? null : allSynonymsForUser; }
public List<UserSynonym> GetSynonymForUser(UserSynonymList user) { var UserSynonymDAL = new UserSynonymDAL(testing); return UserSynonymDAL.GetSynonymForUser(user); }