I use ASP.NET MVC 5 and Entity Framework 6. So I have generated some files under *.tt
I would like to keep attributes that i inserted into those files because I have created many pages automatically based on Entity Framework classes.
But when I update Entity Framework model from the database I loose everything that I inserted.
So my question is how to keep it from deleting?
//------------------------------------------------------------------------------ // // This code was generated from a template. // // Manual changes to this file may cause unexpected behavior in your application. // Manual changes to this file will be overwritten if the code is regenerated. // //------------------------------------------------------------------------------
namespace MyWebSIte.DataModel
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
public partial class ItemMovement
{
public System.Guid ID { get; set; }
[DataType(DataType.DateTime)] <---- I would like to keep it.
[DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
[Display(Name = "Fecha")]
public System.DateTime? Changed { get; set; }