Skip to content

Instantly share code, notes, and snippets.

View tanaka-takayoshi's full-sized avatar

tanaka_733 tanaka-takayoshi

View GitHub Profile
using System;
using System.Linq;
using Microsoft.Web.Deployment;
namespace MSDeploySample
{
class Program
{
static void Main(string[] args)
{
exports.post = function(request, response) {
var table = request.service.tables.getTable('sampletable');
table.insert({
userid: request.body.UserId,
text: request.body.Text
}, {
success: function(results) {
response.send(statusCodes.OK, { message : '拝承' });
}
});
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Microsoft.WindowsAzure.MobileServices;
using Newtonsoft.Json.Linq;
namespace MobileClient.Core
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MobileClient.Core;
namespace MobilseClient.ConsoleApp
{
class Program
Param (
$parameters = @{},
$srcFolder,
$scriptFolder,
$projectName,
$projectVersion
)
# get script variables
$nugetApiKey = $parameters["NuGetApiKey-secure"]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Controllers;
using MetroEShoppingService.Models;
using Microsoft.WindowsAzure.Mobile.Service.Security;
using Microsoft.WindowsAzure.Mobile.Service.Tables;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.Common;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using Dapper;
namespace MetroEShoppingService.Models
CREATE TABLE [<MobileServiceName>].[UserDevices] (
[id] NVARCHAR (255) CONSTRAINT [DF_UserDevices_id] DEFAULT (CONVERT([nvarchar](255),newid(),(0))) NOT NULL,
[__createdAt] DATETIMEOFFSET (3) CONSTRAINT [DF_UserDevices___createdAt] DEFAULT (CONVERT([datetimeoffset](3),sysutcdatetime(),(0))) NOT NULL,
[__updatedAt] DATETIMEOFFSET (3) NULL,
[__version] ROWVERSION NOT NULL,
[userId] NVARCHAR (450) NULL,
[deviceId] NVARCHAR (MAX) NULL,
[channeluri] NVARCHAR (MAX) NULL,
PRIMARY KEY NONCLUSTERED ([id] ASC)
);
using System;
using System.Linq;
using Microsoft.Web.Deployment;
namespace MSDeploySample
{
class Program
{
static void Main(string[] args)
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using System.Text;
using System.Threading.Tasks;
namespace MyCmdlets
{
[Cmdlet(VerbsCommon.Get, "Greeting")]