This file contains hidden or 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
@page "/counter" | |
<h1>Counter</h1> | |
<p>Current count: @currentCount</p> | |
<button class="btn btn-primary" onclick="@IncrementCount">Click me</button> | |
@functions { | |
int currentCount = 0; |
This file contains hidden or 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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
new OperationDemo().Run(); | |
} | |
} | |
public class Expression | |
{ | |
public string Operator { get; set; } |
This file contains hidden or 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
pm.test("Status code is 200", function () { | |
pm.response.to.have.status(200); | |
}); | |
pm.test("Response time is less than 200ms", function () { | |
pm.expect(pm.response.responseTime).to.be.below(200); | |
}); | |
pm.test("Return added product data", function () { | |
var jsonData = pm.response.json(); |
This file contains hidden or 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
- task: PublishPipelineArtifact@1 | |
inputs: | |
targetPath: '$(Build.Repository.LocalPath)/Tests' | |
artifact: 'Tests' |
This file contains hidden or 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 DatabaseRestoreService : IDatabaseRestoreService | |
{ | |
private Lazy<DataContext> _dataContext; | |
protected DataContext DataContext => _dataContext.Value; | |
public DatabaseRestoreService(Lazy<DataContext> dataContext) | |
{ | |
_dataContext = dataContext; |
This file contains hidden or 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 BaseModel | |
{ | |
public BaseModel() | |
{ | |
IsActive = true; | |
} | |
public int Id { get; set; } | |
public bool IsActive { get; set; } |
This file contains hidden or 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 DatabaseRestoreService : IDatabaseRestoreService | |
{ | |
private static NLog.Logger _logger = NLog.LogManager.GetCurrentClassLogger(); | |
public Result Restore(string connectionString) | |
{ | |
var connectionBuilder = new SqlConnectionStringBuilder(connectionString); | |
var databaseName = connectionBuilder.InitialCatalog; | |
_logger.Info($"Restore snapshot for {databaseName} database"); |
This file contains hidden or 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 AdminSettingsView : Window, ISettingsView | |
{ | |
public AdminSettingsView() | |
{ | |
InitializeComponent(); | |
} | |
public double OrderNumber => 10; | |
public bool CanShow(ApplicationContext context) |
This file contains hidden or 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 static class WebApiConfig | |
{ | |
public static void Register(HttpConfiguration config) | |
{ | |
// Add only Json formatter for Postman import | |
config.Formatters.Clear(); | |
config.Formatters.Add(new JsonMediaTypeFormatter()); | |
// Web API routes | |
config.MapHttpAttributeRoutes(); |
This file contains hidden or 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
<ItemGroup> | |
<ProjectReference Include="..\EFCoreMigrations.Web\EFCoreMigrations.Web.csproj" GlobalPropertiesToRemove="SelfContained" /> | |
</ItemGroup> |