I am starting to use Entity Framework 4. I assume that I cannot change the database fields. I have a DateAdded field that is stored as YYYYMMDD and I would like to have entity.DateAdded as a DateTime type. This will simplify the work.
Is there a way to make my own column data type mapping? or any workarounds?
You can add an additional property in a partial class for an object that wraps the "raw" property.
namespace TheNamespace { public partial class TheEntity { public DateTime DateAdded { get { } set { } } } }
Source: https://habr.com/ru/post/1342660/More articles:C #: Is there a winforms way to make C # MessageBox (YesNo) buttons bigger? - c #Adding a column to a select statement based on the presence of a record in another table - sqlhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1342657/what-scope-do-i-use-to-grant-imap-access-to-gmail-with-oauth&usg=ALkJrhhACD_IqilTwfkRIj736-nEukXWnwGetting formatted datetime in Python, as in PHP - pythonEdit diff files - diffSimple format for implicit reunion - semanticsWebsphere js scripts cannot access AdminTask - scriptingHow can I make this labeling system sortable? - javascriptHow to access the connection string from the library - c #python: sys.argv [0] value in official documentation - pythonAll Articles