Add inheritdoc to migration files
See original GitHub issueIt would be nice if dotnet ef migrations add
would automatically add
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
to the beginning of generated file and
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
at the end of file. I mean both (migrations and designer).
For example:
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace OpPIS.Web.Hosting.Migrations
{
public partial class Fix5 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "ParentAnchorX",
table: "VarDesign_Parameter-ImageManipulations",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ParentAnchorX",
table: "VarDesign_Parameter-ImageManipulations");
}
}
}
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Entity Framework Migration Inheritance without creating the ...
I have database objects that all inherit from a parent class with some base properties. Base Entity public abstract class Entity : IAuditable...
Read more >Migrations | Django documentation
Migrations are Django's way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your database schema....
Read more >How to Use EF Core Migrations - C# Tutorial
Use EF Core migration flow to apply changes from models to the database. · Use the Add-Migration command to create a new migration....
Read more >Using the <inheritdoc /> Tag
This allows you to inherit documentation from base class libraries without having to add them as documentation assemblies in your project. Since the...
Read more >Migrations - Flyway
Migrations. Overview. With Flyway all changes to the database are called migrations. Migrations can be either versioned or repeatable.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@MaklaCof We will have a think about adding XML comments to the generated code, but we don’t plan to do it at the present time. Beyond that, we don’t want to generate this pragma all the time because most people will not need it. However, there is a similar discussion about auto-generated in issue #10203. I posted a code snippet in that issue showing how to override the generator to add a line–this should also work for the pragma.
For reference in this ticket, this is what I used to generate the pragma’s:
Together with this class somewhere in the starting assembly: