Q:

Can I use a single DateTime field on the Entity Framework model side when the value is stored in a set of Int fields in the actual database? 

The actual table in the database has separate integer fields for storing year, month, day, hour and minute values (all in UTC) (seconds and milliseconds are irrelevant for my task and considered equal to zero). 
Needless to say it would be of great convenience to have just one field of DateTime type on the application side and hide all the conversion under the cover of the Entity Framework model code. 
Any directions on how to do that?  I am not very experienced with Entity Framework yet. 

A:

I answered a similar question earlier: Can I use Data Annotations or Fluent to convert a value between data store and entity class? 
As far as I know, this is not currently possible in EF. 
What you can do is expose a helper property that is not mapped to the database. 
[NotMapped]
public DateTime DateTime
{
  get { return new DateTime( Year, Month, Day, Hour, Minute, 0, DateTimeKind. Utc); }
  set
  {
    Year = value. Year;
    Year = value. Year;
    Month = value. Month;
    Day = value. Day;
    Hour = value. Hour;
    Minute = value. Minute;
  }
}

