View MeuApiController.cs
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Web.Http;
using System.Web.Http.Description;
namespace MeuProjeto.Web.Controllers.Api
{
View FileMediaFormatter.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Net.Http.Headers;
using System.Reflection;
using System.Threading.Tasks;
View andrepaggi.cs
interface IConnectionString
{
string ObterConnectionDoClienteString();
}
class ConnectionString : IConnectionString
{
private Dicitionary<string, string> _connectionStrings = new Dicitionary<string, string>();
public string ObterConnectionDoClienteString()
View results.md
Elapsed Title
00:00:01.4098212 ADO Puro
00:00:01.4771617 Dapper
00:00:06.1009449 Entity Framework
00:00:01.6514433 Entity Framework Fast
00:00:06.5666193 NHibernate
View collations.md
View OperationResult.cs
public struct OperationResult<T>
{
public T Result { get; set; }
public Exception Exception { get; }
public bool IsSuccess { get; }
public OperationResult(T result)
{
IsSuccess = true;
Exception = null;
View FluentEFTypeMappingGenerator.cs
public static class FluentEFTypeMappingGenerator
{
private static bool _theKeyIsAlrearyWriten;
private static XDocument _documentationXml;
public static string GenerateForClass<T>()
{
var mainType = typeof(T);
var assemblyLocation = mainType.Assembly.Location;
var xmlFileDocumentation = Path.ChangeExtension(Path.Combine(Path.GetDirectoryName(assemblyLocation), Path.GetFileName(assemblyLocation)), "xml");
View InstallApplicationInsightsStatusMonitor.bat
mkdir c:\mustinstall
@powershell -command "& { (New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi', 'c:\mustinstall\webpi.msi') }"
msiexec /i c:\mustinstall\webpi.msi /quiet
cd "C:\Program Files\Microsoft\Web Platform Installer"
WebpiCmd.exe /Install /Products:ApplicationInsightsStatusMonitor /AcceptEula
View index.html
<div class="application">
<div class="sidebar">Sidebar</div>
<div class="main">
<div class="header">Header</div>
<div class="content">
<h3>Content with scroll</h3>
<h3>Content with scroll</h3>
<h3>Content with scroll</h3>
<h3>Content with scroll</h3>
<h3>Content with scroll</h3>
View Program.cs
using System;
using Microsoft.Extensions.DependencyInjection;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
var serviceCollection = new ServiceCollection();