The next generation of the Teknik Services. Written in ASP.NET.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TeknikEntities.cs 971B

1234567891011121314151617181920212223242526272829
  1. using Microsoft.AspNet.Identity.EntityFramework;
  2. using System.Data.Entity;
  3. using System.Data.Entity.Infrastructure;
  4. using Teknik.Areas.Blog.Models;
  5. using Teknik.Areas.Profile.Models;
  6. using Teknik.Migrations;
  7. namespace Teknik.Models
  8. {
  9. public class TeknikEntities : DbContext
  10. {
  11. public DbSet<User> Users { get; set; }
  12. public DbSet<Group> Groups { get; set; }
  13. public DbSet<Role> Roles { get; set; }
  14. public DbSet<Blog> Blogs { get; set; }
  15. public DbSet<Post> Posts { get; set; }
  16. protected override void OnModelCreating(DbModelBuilder modelBuilder)
  17. {
  18. modelBuilder.Entity<User>().ToTable("Users");
  19. modelBuilder.Entity<Group>().ToTable("Groups");
  20. modelBuilder.Entity<Role>().ToTable("Roles");
  21. modelBuilder.Entity<Blog>().ToTable("Blogs");
  22. modelBuilder.Entity<Post>().ToTable("Posts");
  23. base.OnModelCreating(modelBuilder);
  24. }
  25. }
  26. }