/// <summary> /// Update or create a list of EntityRules. /// </summary> /// <param name="request">The request containing the EntityRules that needs to be created or updated</param> /// <returns>the list of values updated or created will be returned.</returns> public virtual JarsRulesResponse Any(StoreJarsRules request) { //return ExecuteFaultHandledMethod(() => //{ JarsRulesResponse response = new JarsRulesResponse(); IGenericEntityRepositoryBase <JarsRule, IDataContextNhJars> _repository = _DataRepositoryFactory.GetDataRepository <IGenericEntityRepositoryBase <JarsRule, IDataContextNhJars> >(); response.Rules = _repository.CreateUpdateList(request.Rules, CurrentSessionUsername).ToList(); return(response); // }); }
void OnSaveEntityRule(JarsRule rule) { StoreJarsRules storeRules = new StoreJarsRules() { Rules = new List <JarsRule>() { rule } }; var response = ServiceClient.Post(storeRules); if (response.ResponseStatus == null) { rule = response.Rules.FirstNonDefault(); ServiceClient.Post(new JarsRulesNotification() { Selector = SelectorTypes.store, FromUserName = Context.LoggedInUser.UserName, Ids = response.Rules.Select(r => r.Id).ToList() }); } }