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 IHttpActionResult GetWithControllerRedirect(string system, string rcontroller) | |
{ | |
try | |
{ | |
string url = $"http://localhost:55164/api/{rcontroller}"; | |
var request = (HttpWebRequest)WebRequest.Create(string.Format(url)); | |
request.Method = "GET"; | |
request.ContentType = "application/json; charset=utf-8"; | |
request.Accept = "application/json; charset=utf-8"; | |
var response = (HttpWebResponse)request.GetResponse(); |
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
var list = new List<Example>{ | |
new Example{ | |
Id = 1, | |
Description = "First Level", | |
Type = 4, | |
ParentId = 0 | |
}, | |
new Example{ | |
Id = 2, |
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
{ | |
"dependencies": { | |
"Microsoft.AspNetCore.Mvc": "1.0.0", | |
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", | |
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0", | |
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", | |
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0", | |
"Microsoft.Extensions.Configuration.Json": "1.0.0", | |
"Microsoft.Extensions.Logging": "1.0.0", | |
"Microsoft.Extensions.Logging.Console": "1.0.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
public void Configuration(IAppBuilder app) | |
{ | |
var config = new HttpConfiguration(); | |
app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions()); | |
WebApiConfig.ConfigureWebApi(config); | |
app.UseCors(CorsOptions.AllowAll); | |
var kernel = new Func<StandardKernel>(new Container().CreateKernel); |
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
System.Reflection.TargetInvocationException: Uma exceção foi acionada pelo destino de uma chamada. ---> System.Net.WebException: A conexão subjacente estava fechada: Erro inesperado em um recebimento. ---> System.IO.IOException: Não é possível ler os dados da conexão de transporte: Foi forçado o cancelamento de uma conexão existente pelo host remoto. ---> System.Net.Sockets.SocketException: Foi forçado o cancelamento de uma conexão existente pelo host remoto | |
em System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) | |
--- Fim do rastreamento de pilha de exceções internas --- | |
em System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) | |
em System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) | |
em System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) | |
--- Fim do rastreamento de pilha de exceções internas --- | |
em System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest requ |
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
//Models | |
public class Comarca | |
{ | |
public Comarca(){} | |
public Comarca(string descricao, Guid ufId) | |
{ | |
Id = Guid.NewGuid(); | |
Descricao = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(descricao); |
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 MyContext : DbContext | |
{ | |
public MyContext(DbContextOptions<MyContext> options) :base(options) | |
{ } | |
public DbSet<Obj1> Obj1s { 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
{System.ObjectDisposedException: Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances. | |
Object name: 'SistemaJuridicoContext'. | |
at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider() | |
at Microsoft.EntityFrameworkCore.DbContext.get_ChangeTracker() | |
at Microsoft.EntityFrameworkCore.Query.CompiledQueryCacheKeyGenerator.GenerateCacheKeyCore(Expression query, Boolean async) | |
at Microsoft.EntityFrameworkCore.Query.Internal.RelationalCompiledQueryCacheKeyGenerator.GenerateCacheKeyCore(Expression query, Boolean async) | |
at Microsoft.EntityFrameworkCore.Query.Internal.RelationalCompiledQueryCacheKeyGen |
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
jQuery(function ($) { | |
$(document).ready(function () { | |
$('.modal-loading').show(); | |
//########## Manipulação HTML ########## | |
getUf(); | |
getBancos(); | |
getAcao(); | |
getPublicacao(); |