<commit_before>﻿using System;
using System.Runtime.Serialization;

namespace DotNetDesign.EntityFramework
{
    /// <summary>
    /// Base implementation of IEntityData.
    /// </summary>
    /// <typeparam name="TEntityData">The type of the entity data.</typeparam>
    /// <typeparam name="TEntity">The type of the entity.</typeparam>
    /// <typeparam name="TEntityRepository">The type of the entity repository.</typeparam>
    [DataContract]
    public abstract class BaseEntityData<TEntityData, TEntity, TEntityRepository> : BaseEntityData<TEntityData, TEntity, EntityIdentifier, TEntityRepository>
        where TEntityData : class, IEntityData<TEntityData, TEntity, TEntityRepository>
        where TEntity : class, IEntity<TEntity, TEntityData, TEntityRepository>, TEntityData
        where TEntityRepository : class, IEntityRepository<TEntityRepository, TEntity, TEntityData>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseEntityData&lt;TEntityData, TEntity, TEntityRepository&gt;"/> class.
        /// </summary>
        protected BaseEntityData()
        {
            Id = new EntityIdentifier();
        }
    }

    /// <summary>
    /// Base implementation of IEntityData.
    /// </summary>
    /// <typeparam name="TEntityData">The type of the entity data.</typeparam>
    /// <typeparam name="TEntity">The type of the entity.</typeparam>
    /// <typeparam name="TId">The type of the id.</typeparam>
    /// <typeparam name="TEntityRepository">The type of the entity repository.</typeparam>
    [DataContract]
    public abstract class BaseEntityData<TEntityData, TEntity, TId, TEntityRepository> : IEntityData<TEntityData, TEntity, TId, TEntityRepository>
        where TEntityData : class, IEntityData<TEntityData, TEntity, TId, TEntityRepository>
        where TEntity : class, IEntity<TEntity, TId, TEntityData, TEntityRepository>, TEntityData
        where TEntityRepository : class, IEntityRepository<TEntityRepository, TEntity, TId, TEntityData>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseEntityData&lt;TEntityData, TEntity, TId, TEntityRepository&gt;"/> class.
        /// </summary>
        protected BaseEntityData()
        {
            Version = 0;
        }

        /// <summary>
        /// Gets or sets the version.
        /// </summary>
        /// <value>
        /// The version.
        /// </value>
        [DataMember]
        public int Version { get; set; }

        /// <summary>
        /// Gets or sets the created at.
        /// </summary>
        /// <value>
        /// The created at.
        /// </value>
        [DataMember]
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// Gets or sets the last updated at.
        /// </summary>
        /// <value>
        /// The last updated at.
        /// </value>
        [DataMember]
        public DateTime LastUpdatedAt { get; set; }

        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        /// <value>
        /// The id.
        /// </value>
        [DataMember]
        public TId Id { get; set; }

        /// <summary>
        /// Gets the version id.
        /// </summary>
        public string VersionId
        {
            get { return Id + "::" + Id; }
        }
    }
}<commit_msg>fixing typo in VersionId<commit_after>﻿using System;
using System.Runtime.Serialization;

namespace DotNetDesign.EntityFramework
{
    /// <summary>
    /// Base implementation of IEntityData.
    /// </summary>
    /// <typeparam name="TEntityData">The type of the entity data.</typeparam>
    /// <typeparam name="TEntity">The type of the entity.</typeparam>
    /// <typeparam name="TEntityRepository">The type of the entity repository.</typeparam>
    [DataContract]
    public abstract class BaseEntityData<TEntityData, TEntity, TEntityRepository> : BaseEntityData<TEntityData, TEntity, EntityIdentifier, TEntityRepository>
        where TEntityData : class, IEntityData<TEntityData, TEntity, TEntityRepository>
        where TEntity : class, IEntity<TEntity, TEntityData, TEntityRepository>, TEntityData
        where TEntityRepository : class, IEntityRepository<TEntityRepository, TEntity, TEntityData>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseEntityData&lt;TEntityData, TEntity, TEntityRepository&gt;"/> class.
        /// </summary>
        protected BaseEntityData()
        {
            Id = new EntityIdentifier();
        }
    }

    /// <summary>
    /// Base implementation of IEntityData.
    /// </summary>
    /// <typeparam name="TEntityData">The type of the entity data.</typeparam>
    /// <typeparam name="TEntity">The type of the entity.</typeparam>
    /// <typeparam name="TId">The type of the id.</typeparam>
    /// <typeparam name="TEntityRepository">The type of the entity repository.</typeparam>
    [DataContract]
    public abstract class BaseEntityData<TEntityData, TEntity, TId, TEntityRepository> : IEntityData<TEntityData, TEntity, TId, TEntityRepository>
        where TEntityData : class, IEntityData<TEntityData, TEntity, TId, TEntityRepository>
        where TEntity : class, IEntity<TEntity, TId, TEntityData, TEntityRepository>, TEntityData
        where TEntityRepository : class, IEntityRepository<TEntityRepository, TEntity, TId, TEntityData>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseEntityData&lt;TEntityData, TEntity, TId, TEntityRepository&gt;"/> class.
        /// </summary>
        protected BaseEntityData()
        {
            Version = 0;
        }

        /// <summary>
        /// Gets or sets the version.
        /// </summary>
        /// <value>
        /// The version.
        /// </value>
        [DataMember]
        public int Version { get; set; }

        /// <summary>
        /// Gets or sets the created at.
        /// </summary>
        /// <value>
        /// The created at.
        /// </value>
        [DataMember]
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// Gets or sets the last updated at.
        /// </summary>
        /// <value>
        /// The last updated at.
        /// </value>
        [DataMember]
        public DateTime LastUpdatedAt { get; set; }

        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        /// <value>
        /// The id.
        /// </value>
        [DataMember]
        public TId Id { get; set; }

        /// <summary>
        /// Gets the version id.
        /// </summary>
        public string VersionId
        {
            get { return Id + "::" + Version; }
        }
    }
}
{'fraction_non_alphanumeric': 0.12939773404889685, 'fraction_numerical': 0.0002981514609421586, 'mean_word_length': 2.0747021081576533, 'pattern_counts': {'":': 2, '<': 107, '<?xml version=': 0, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3512009', 'n_tokens_mistral': 1867, 'n_tokens_neox': 1851, 'n_words': 505}