-
build: Alterações que afetam o sistema de construção ou dependências externas (escopos de exemplo: gulp, broccoli, npm),
-
ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs);
-
docs: referem-se a inclusão ou alteração somente de arquivos de documentação;
-
feat: Tratam adições de novas funcionalidades ou de quaisquer outras novas implantações ao código;
This file contains 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 async Task updateT1 (T update) { | |
db.Table.Attach(updatedUser); | |
var entry = db.Entry(updatedUser); | |
entry.Property(e => e.Field).IsModified = true; | |
await db.SaveChangesAsync(); | |
} |
This file contains 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 CustomValidation : AbstractValidator<ToValidateViewModel> | |
{ | |
public EditarCursoValidation() | |
{ | |
RuleFor(example => example).SetValidator(new Validator()); | |
} | |
} | |
public class Validator : AbstractValidator<ToValidateViewModel> |
This file contains 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
using Microsoft.Extensions.Options; | |
using Offpepe.Gists.Configurations; | |
namespace Offpepe.Gists.Business; | |
// Injecting config | |
public class ExampleClassToInject { | |
private readonly ConfigObject _configObject; | |
public ExampleClassToInject(IOptions<ConfigObject> configObject) { | |
_configObject = configObject.Value; |
quanto mais voce souber sobre isso mais chances de ser contratado
https://twitter.com/sseraphini/status/1385561029778845698
https://gist.github.com/sibelius/b1a10021b83165a72de8b31e7b9d58c5
arquitetura somente para seniors
This file contains 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 SaveChangesParallel(List<objeto> objetos) | |
{ | |
var saveList = new List<List<objeto>>(); | |
var count = 0; | |
while (count < objetos.Count) | |
{ | |
var partialSaves = objetos.Skip(count).Take(250).ToList(); | |
count += partialSaves.Count; | |
saveList.Add(partialSaves); | |
} |
This file contains 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 static string ConvertToCommaSeparatedValues<T>(this IEnumerable<T> objects) where T : class | |
{ | |
var builder = new StringBuilder(); | |
var properties = typeof(T).GetProperties(); | |
builder.Append(string.Join(",", properties.Select(p => p.Name))); | |
builder.Append('\n'); | |
foreach (var obj in objects) | |
{ | |
var objValues = obj.GetType().GetProperties() | |
.Select(op => op.GetValue(obj)); |