internal static async void InitializeDbForTests(IdentidadeAcessoDbContext db) { db.Permissoes.AddRange(ObterPermissoes()); db.Perfis.AddRange(ObterPerfis()); db.Usuarios.AddRange(ObterUsuarios()); db.TokensRedefinicaoSenha.Add(TokenRedefinicaoSenha.TokenRedefinicaoSenhaFactory.CriarToken("/9o1HFf2a2KDXf6bSzuJZyn0CqNgdY2vgVGmkGXo8g7L40Q1J31OcCdmqzWr23PE", "*****@*****.**", Guid.Parse("50d4a981-48d3-42e6-9c6e-9602184afca7"))); await db.SaveChangesAsync(); }
public async Task <CommandResponse> Commit() { return(await Context.SaveChangesAsync() > 0 ? CommandResponse.Ok : CommandResponse.Fail); }