// Default contructor that set entity to field public aspnet_ProfileModel(aspnet_Profile aspnet_profile) { this._aspnet___profile = aspnet_profile; this._user_id = aspnet_profile.UserId; this._property_names = aspnet_profile.PropertyNames; this._property_values_string = aspnet_profile.PropertyValuesString; this._property_values_binary = aspnet_profile.PropertyValuesBinary; this._last_updated_date = aspnet_profile.LastUpdatedDate; this._originalaspnet_Profile = aspnet_profile.DeepClone(); }
public void InsertExpiryDate(string userName, DateTime expiryDate) { using (DockerDBEntities dockerEntities = new DockerDBEntities()) { aspnet_Users user = (from p in dockerEntities.aspnet_Users where p.UserName == userName select p).First(); if (user.aspnet_Profile == null) { aspnet_Profile profile = new aspnet_Profile(); profile.UserId = user.UserId; profile.LastUpdatedDate = DateTime.Now; profile.PropertyNames = "ExpiryDate"; profile.PropertyValuesString = expiryDate.ToString(); Byte[] fg = new Byte[2]; profile.PropertyValuesBinary = fg; dockerEntities.aspnet_Profile.Add(profile); } else { user.aspnet_Profile.PropertyValuesString = expiryDate.ToString(); } dockerEntities.SaveChanges(); } }
partial void Deleteaspnet_Profile(aspnet_Profile instance);
partial void Updateaspnet_Profile(aspnet_Profile instance);
partial void Insertaspnet_Profile(aspnet_Profile instance);
/// <summary> /// There are no comments for aspnet_Profile in the schema. /// </summary> public void AddToaspnet_Profile(aspnet_Profile aspnet_Profile) { base.AddObject("aspnet_Profile", aspnet_Profile); }
/// <summary> /// Create a new aspnet_Profile object. /// </summary> /// <param name="userId">Initial value of UserId.</param> /// <param name="propertyNames">Initial value of PropertyNames.</param> /// <param name="propertyValuesString">Initial value of PropertyValuesString.</param> /// <param name="propertyValuesBinary">Initial value of PropertyValuesBinary.</param> /// <param name="lastUpdatedDate">Initial value of LastUpdatedDate.</param> public static aspnet_Profile Createaspnet_Profile(global::System.Guid userId, string propertyNames, string propertyValuesString, byte[] propertyValuesBinary, global::System.DateTime lastUpdatedDate) { aspnet_Profile aspnet_Profile = new aspnet_Profile(); aspnet_Profile.UserId = userId; aspnet_Profile.PropertyNames = propertyNames; aspnet_Profile.PropertyValuesString = propertyValuesString; aspnet_Profile.PropertyValuesBinary = propertyValuesBinary; aspnet_Profile.LastUpdatedDate = lastUpdatedDate; return aspnet_Profile; }
/// <summary> /// Create a new aspnet_Profile object. /// </summary> /// <param name="userId">Initial value of UserId.</param> /// <param name="lastUpdatedDate">Initial value of LastUpdatedDate.</param> /// <param name="propertyNames">Initial value of PropertyNames.</param> /// <param name="propertyValuesString">Initial value of PropertyValuesString.</param> public static aspnet_Profile Createaspnet_Profile(string userId, global::System.DateTime lastUpdatedDate, string propertyNames, string propertyValuesString) { aspnet_Profile aspnet_Profile = new aspnet_Profile(); aspnet_Profile.UserId = userId; aspnet_Profile.LastUpdatedDate = lastUpdatedDate; aspnet_Profile.PropertyNames = propertyNames; aspnet_Profile.PropertyValuesString = propertyValuesString; return aspnet_Profile; }
partial void Deleteaspnet_Profile(aspnet_Profile instance);
partial void Updateaspnet_Profile(aspnet_Profile instance);
partial void Insertaspnet_Profile(aspnet_Profile instance);
// Update a existed aspnet_Profile public aspnet_Profile Updateaspnet_Profile(aspnet_Profile _aspnet_Profile) { unitOfWork.Update <aspnet_Profile>(_aspnet_Profile); return(_aspnet_Profile); }
// Delete a existed aspnet_Profile public void Deleteaspnet_Profile(aspnet_Profile _aspnet_Profile) { unitOfWork.Delete <aspnet_Profile>(_aspnet_Profile); }
// Add a new aspnet_Profile public aspnet_Profile Addaspnet_Profile(aspnet_Profile _aspnet_Profile) { unitOfWork.Add <aspnet_Profile>(_aspnet_Profile); return(_aspnet_Profile); }
// Refresh an existed aspnet_Profile public aspnet_Profile Refeshaspnet_Profile(aspnet_Profile _aspnet_Profile) { unitOfWork.Refresh <aspnet_Profile>(_aspnet_Profile); return(_aspnet_Profile); }