コード例 #1
0
        public override void Add(TDataModel entity)
        {
            try
            {
                var identityPropertyInfo = ConfigureFramework.GetIdentityPropertyInfoModelTypes(typeof(TDataModel).GetHashCode());

                SetIdentityValueToDefaultValue(entity, identityPropertyInfo);
                Repository.Add(entity);
                Save();
            }
            catch (GenericRepositoryException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new ServiceLayerException("An error occured while inserting entity !", ex);
            }
        }
コード例 #2
0
 public static void Initialize(this IServiceCollection services)
 {
     InitializeFilters(services);
     ConfigureFramework.Initialize(services);
 }