This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class FullAddressFullTextIndex : Migration | |
{ | |
protected override void Up(MigrationBuilder migrationBuilder) | |
{ | |
string sql = GeneralFunctions.ReadSql(typeof(FullAddressFullTextIndex), "20220702124309_FullAddressFullTextIndex.sql"); | |
migrationBuilder.Sql(sql, true); | |
} | |
protected override void Down(MigrationBuilder migrationBuilder) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE FULLTEXT INDEX ON dbo.Addresses(FullAddress) | |
KEY INDEX PK_Addresses ON FTCAddress | |
WITH STOPLIST = OFF, CHANGE_TRACKING AUTO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<IEnumerable<AddressViewModel>> GetAddresses(string query) | |
{ | |
var foundAddresses = await LocationApiRepository.AddressRepository.GetFullText(t => t.FullAddress, query) | |
.Select(c => new AddressViewModel() | |
{ | |
Id = c.Id, | |
FullAddress = c.FullAddress, | |
}) | |
.Take(30) | |
.ToListAsync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IQueryable<Address> GetFullText( | |
Expression<Func<Address, string>> predicate, | |
string query, | |
int currentPage = 0, | |
int pageSize = 0) | |
{ | |
if (pageSize == 0) | |
{ | |
return Context.Addresses | |
.Where(e => EF.Functions.Contains(e.FullAddress, $"\"{query}\"")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<SEO | |
title={props.title} | |
location={props.location} | |
type={SeoConstants.Types.Article} | |
author={props.author} | |
authorTwitterUserName={props.authTwitterUserName} | |
description={props.description} | |
datePublished={props.datePublished} | |
dateModified={props.dateModified} | |
readTime={props.readTime} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AzureDevOpsGetProjectGroupsResponseDto | |
{ | |
public int count { get; set; } | |
public Value[] value { get; set; } | |
public class Value | |
{ | |
public string subjectKind { get; set; } | |
public string description { get; set; } | |
public string domain { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = appSettings.AzureDevOpsSettings.GetProjectGroupsUrl | |
.Replace("{organisation}", organisation) | |
.Replace("{scopeDescriptor}", projectDescriptor); | |
var (result, response) = await apiCall.GetAsync<AzureDevOpsGetProjectGroupsResponseDto>( | |
url: url, | |
password: appSecrets.AzureDevOpsToken); | |
if (result.IsEmpty()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AzureDevOpsCreateGroupResponseDto | |
{ | |
public string subjectKind { get; set; } | |
public string description { get; set; } | |
public string domain { get; set; } | |
public string principalName { get; set; } | |
public object mailAddress { get; set; } | |
public string origin { get; set; } | |
public string originId { get; set; } | |
public string displayName { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<(GroupViewModel, HttpStatusCode)> CreateGroup(GroupViewModel group, string scopeDescriptor) | |
{ | |
var request = new AzureDevOpsCreateGroupRequestDto() | |
{ | |
displayName = group.Name, | |
description = group.Description | |
}; | |
var url = appSettings.AzureDevOpsSettings.CreateGroupUrl | |
.Replace("{organisation}", group.Organisation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"value": "scp.MDU4....ZGNm", | |
"_links": { | |
"self": { | |
"href": "https://vssps.dev.azure.com/.../_apis/Graph/Descriptors/953d3623...aa0e770d" | |
}, | |
"storageKey": { | |
"href": "https://vssps.dev.azure.com/.../_apis/Graph/StorageKeys/scp.MDU4YTU2N........ZGNm" | |
}, | |
"subject": { |