/// <summary> /// 添加用户登录日记 /// </summary> /// <param name="model">用户登录日记模型</param> /// <returns>是否成功</returns> public ResultModel AddYH_UserLogin(YH_UserLoginLogModel model) { var result = new ResultModel { Data = _database.Db.YH_UserLoginLog.Insert(model) }; return(result); }
/// <summary> /// 删除用户登录日记 /// </summary> /// <param name="model">用户登录日记模型</param> /// <returns>是否删除成功</returns> public ResultModel DeleteYH_UserLogin(YH_UserLoginLogModel model) { var result = new ResultModel { Data = _database.Db.YH_UserLoginLog.Delete(ID: model.ID) }; result.IsValid = result.Data > 0 ? true : false; return(result); }
public string DeleteYH_UserLoginLogLog(int?ID) { YH_UserLoginLogModel model = new YH_UserLoginLogModel(); if (ID.HasValue) { model.ID = ID.Value; var result = this._YH_userLoginLogService.DeleteYH_UserLogin(model).Data; return(result == true ? "Delete success!" : "Delete failed!"); } return("Delete failed!"); }
public static YH_UserLoginLog ToEntity(this YH_UserLoginLogModel model) { return(Mapper.Map <YH_UserLoginLog>(model)); }
public void YH_UserLoginLogService_GetYH_UserLoginLogById_Test() { YH_UserLoginLogModel resultModel = this._userLoginLogService.GetYH_UserLoginLogById(1).Data; Assert.IsTrue(true); }