public PatientGuardianController( IJsonApiContext jsonApiContext, IResourceService <Entity.PatientGuardian, int> resourceService, ILoggerFactory loggerFactory, IPatientCommonService patientCommonService) : base(jsonApiContext, resourceService, loggerFactory) { try { _dbContextResolver = jsonApiContext.GetDbContextResolver(); _jsonApiContext = jsonApiContext; jsonApiContext.PageManager.DefaultPageSize = 10; //_dbContextResolver = jsonApiContext.GetDbContextResolver(); this._patientCommonService = patientCommonService; if (jsonApiContext.QuerySet != null && !jsonApiContext.QuerySet.Equals(null)) { jsonApiContext.QuerySet.Filters.Add(new FilterQuery("IsActive", "true", "")); jsonApiContext.QuerySet.Filters.Add(new FilterQuery("IsDeleted", "false", "")); } else { jsonApiContext.QuerySet = new QuerySet(jsonApiContext, new QueryCollection()); jsonApiContext.QuerySet.Filters = new List <FilterQuery>(); jsonApiContext.QuerySet.Filters.Add(new FilterQuery("IsActive", "true", "")); jsonApiContext.QuerySet.Filters.Add(new FilterQuery("IsDeleted", "false", "")); } } catch (Exception ex) { } }
public PatientCommonController(IPatientCommonService patientCommonService, IOptions <JwtIssuerOptions> jwtOptions, ITokenService tokenService) { try { _jwtOptions = jwtOptions.Value; ThrowIfInvalidOptions(_jwtOptions); _tokenService = tokenService; _serializerSettings = new JsonSerializerSettings { Formatting = Formatting.Indented }; this._patientCommonService = patientCommonService; } catch { } }