I'm currently creating many files using t4 templates in vs2015.
My code comes out all misaligned (it's worst in other spot of the generated code)
example -
public bool Add()
{
var returnValue = false;
using (var context = new ApmEntities())
{
context.Entry(this).State = EntityState.Added;
foreach (var item in this.MissionCriticalities)
{
context.Entry(item).State = EntityState.Modified;
}
var number = context.SaveChanges();
returnValue = number > 0;
}
return returnValue;
}
Is there a way to automatically run formatting (similar to doing Ctrl - K - D) on the file?
I'm creating the file with
fileManager.StartNewFile(entity.Name + "DbExtra" + ".cs");
and at the end of the file doing a
fileManager.Process();
(Similar to the t4 that generates objects when using database first entity framework)
Thanks