vim /usr/share/applications/google-chrome.desktop
Exec=/opt/google/chrome/google-chrome --incognito --disable-web-security
--disable-web-security is the key.
[HttpPost] | |
[Route("{system}/{company}/{user}")] | |
public IActionResult Post([FromBody] CompanyEvaluationViewModel companyEvaluationViewModel) | |
{ | |
if (!ModelState.IsValid) | |
{ | |
NotifyModelStateErrors(); | |
return Response(companyEvaluationViewModel); | |
} |
using System.Linq; | |
using AvaliacoesEmpresas.Domain.Interfaces; | |
using AvaliacoesEmpresas.Domain.Models; | |
using AvaliacoesEmpresas.Infra.Data.Context; | |
using Microsoft.EntityFrameworkCore; | |
namespace AvaliacoesEmpresas.Infra.Data.Repository | |
{ | |
public class EvaluationRepository : Repository<Evaluation>, IEvaluationRepository | |
{ |
public Evaluation GetEvaluationByCompany(string client, string company) | |
{ | |
return DbSet.AsNoTracking().FirstOrDefault(c => c.Fk_Company == company && c.Client == client); | |
} | |
//EvaluationListViewModel | |
public EvaluationListViewModel GetEvaluationListByCompany(string client, string company) | |
{ | |
var result = DbSet.AsQueryable() |
<p class="note @((Foo == "Bar" ? "highlight" : ""))">This is a note</p> | |
<!-- OR --> | |
<p class="note @((Foo == Bar ? "highlight" : ""))">This is a note</p> | |
@functions { | |
private string Foo { get; set; } = "Bar"; | |
private string Bar { get; set; } |
jQuery(function ($) { | |
$(document).ready(function () { | |
$('.modal-loading').show(); | |
//########## Manipulação HTML ########## | |
getUf(); | |
getBancos(); | |
getAcao(); | |
getPublicacao(); |
{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 |
public class MyContext : DbContext | |
{ | |
public MyContext(DbContextOptions<MyContext> options) :base(options) | |
{ } | |
public DbSet<Obj1> Obj1s { get; set; } | |
} |
//Models | |
public class Comarca | |
{ | |
public Comarca(){} | |
public Comarca(string descricao, Guid ufId) | |
{ | |
Id = Guid.NewGuid(); | |
Descricao = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(descricao); |