public int AddOrUpdateReRoleModule(PermissionReRoleModule model) { if(model.Id>0) { this.permissionReRoleModuleRepostory.Update(model); }else{ this.permissionReRoleModuleRepostory.Add(model); } this.unitOfWork.Commit(); return model.Id; }
public void InsertRoleModule() { var model = new PermissionReRoleModule { RoleId=1, ModuleId=1, FuncCode=1, OptScope=1 }; var result = this.permissionSvc.AddOrUpdateReRoleModule(model); Assert.IsTrue(result>0); }