Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
Skip Navigation LinksHome » Code Library » Koran

Public general use code classes and xml files that we've compiled and used over the years:

Koran Reference Network Data Context

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Text;
   5:  using System.Data.Entity;
   6:  using System.ComponentModel.DataAnnotations;
   7:  using System.Xml.Linq;
   8:   
   9:  namespace Ia.Islamic.Cl.Model.Context
  10:  {
  11:      ////////////////////////////////////////////////////////////////////////////
  12:   
  13:      /// <summary publish="true">
  14:      /// Koran Reference Network Data Context
  15:      /// </summary>
  16:      /// <value>
  17:      /// https://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.100).aspx
  18:      /// </value>
  19:      /// <remarks> 
  20:      /// Copyright © 2001-2015 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  21:      ///
  22:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  23:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  24:      ///
  25:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  26:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  27:      /// 
  28:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  29:      /// 
  30:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  31:      /// </remarks> 
  32:      public class Koran : DbContext
  33:      {
  34:          /// <summary/>
  35:          public Koran() : base("DefaultConnection") { }
  36:   
  37:          /// <summary/>
  38:          protected override void OnModelCreating(DbModelBuilder modelBuilder)
  39:          {
  40:              Database.SetInitializer(new MigrateDatabaseToLatestVersion<Koran, Ia.Islamic.Cl.Migrations.Configuration>());
  41:          }
  42:   
  43:          /// <summary/>
  44:          public DbSet<Ia.Islamic.Cl.Model.Koran> Korans { get; set; }
  45:          /// <summary/>
  46:          public DbSet<Chapter> Chapters { get; set; }
  47:          /// <summary/>
  48:          public DbSet<Verse> Verses { get; set; }
  49:          /// <summary/>
  50:          public DbSet<Word> Words { get; set; }
  51:   
  52:          /// <summary/>
  53:          public DbSet<VerseTopic> VerseTopics { get; set; }
  54:      }
  55:  }