public bool InsertUserHistory(UserHistory UserHistory) { if (UserHistory is null) { return(false); } DALUserHistory dalUserHistory = new DALUserHistory(connectionString); return(dalUserHistory.Insert(UserHistory)); }
public List <UserHistory> GetUserHistoryByUserId(string UserId) { if (string.IsNullOrEmpty(UserId)) { return(null); } DALUserHistory dalUserHistory = new DALUserHistory(connectionString); List <UserHistory> lstUserHistory = dalUserHistory.GetByUserId(UserId); lstUserHistory.ForEach(EntityBuilder); return(lstUserHistory); }
// USER_HISTORY METHODS. public UserHistory GetUserHistoryById(string Id) { if (string.IsNullOrEmpty(Id)) { return(null); } DALUserHistory dalUserHistory = new DALUserHistory(connectionString); // Gets an user history by its id. UserHistory userHistory = dalUserHistory.GetById(Id); EntityBuilder(userHistory); return(userHistory); }
public UserHistory GetCurrentUserHistoryByUserId(string UserId) { if (string.IsNullOrEmpty(UserId)) { return(null); } DALUserHistory dalUserHistory = new DALUserHistory(connectionString); UserHistory userHistory = dalUserHistory.GetCurrentByUserId(UserId); if (userHistory is null) { return(null); } EntityBuilder(userHistory); return(userHistory); }