Skip to content

Instantly share code, notes, and snippets.

@amr-swalha
amr-swalha / Hello.vue
Created July 17, 2017 10:14
v-bind Example
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<h2 v-bind:title="tooltip">{{ employee }}</h2>
</div>
</template>
<script>
export default {
name: 'hello',
@amr-swalha
amr-swalha / JsonConfigTable.sql
Created February 24, 2018 12:44
The script to create the json.config table
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[JsonConfig](
[Id] [int] NOT NULL,
[Configuration] [nvarchar](max) NULL,
PRIMARY KEY CLUSTERED
@amr-swalha
amr-swalha / JsonConfigSP.sql
Created February 24, 2018 12:45
JSON.Config Stored P
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[JsonConfig_Read_Key]
@key nvarchar(max)
AS
DECLARE @json NVARCHAR(max)
SET @json =
(SELECT [JsonConfig].[Configuration] from JsonConfig
@amr-swalha
amr-swalha / Student.cs
Created March 17, 2018 12:50
POCO Student
namespace LambdaService
{
public class Student
{
public string Name { get; set; }
public string Email { get; set; }
}
}
@amr-swalha
amr-swalha / Function.cs
Created March 17, 2018 12:52
FunctionHandler Student Parameter
public string FunctionHandler(Student input, ILambdaContext context)
{
return $"Name: {input.Name}, Email: {input.Email}";
}
@amr-swalha
amr-swalha / FunctionTest.cs
Created March 17, 2018 12:56
Updating Function Test
public class FunctionTest
{
[Fact]
public void TestToUpperFunction()
{
// Invoke the lambda function and confirm the string was upper cased.
var function = new Function();
var context = new TestLambdaContext();
Student student = new Student
{
"Name":"Amr",
"Email":"test@tutorialsxl.com"
}
public DelegateCommand NavigateToSecond { get; set; } //It will hold the nivgation
private INavigationService _navigationService; //To get the navigationservice
public MainPageViewModel(INavigationService navigationService)
: base (navigationService)
{
Title = "Main Page";
_navigationService = navigationService;
NavigateToSecond = new DelegateCommand(NavigateToSecondCall);
}
public void NavigateToSecondCall()
{
_navigationService.NavigateAsync("SecondPage");
}