Пример #1
0
 public void Update(Organization Entity)
 {
     try
     {
         _db = new SocialAppEntities();
         _db.Entry(Entity).State = EntityState.Modified;
         _db.SaveChanges();
     }
     catch (Exception)
     {
         throw new NotImplementedException();
     }
 }
Пример #2
0
 public Organization GetById(int?id)
 {
     try
     {
         _db = new SocialAppEntities();
         var organization = _db.Organizations.Where(o => o.OrganizationID == id).FirstOrDefault();
         return(organization);
     }
     catch (Exception)
     {
         throw new NotImplementedException();
     }
 }
Пример #3
0
 public IEnumerable <Organization> Retrive()
 {
     try
     {
         _db = new SocialAppEntities();
         var organizations = _db.Organizations.ToList();
         return(organizations);
     }
     catch (Exception)
     {
         throw new NotImplementedException();
     }
 }
Пример #4
0
 public void Create(Organization Entity)
 {
     try
     {
         _db = new SocialAppEntities();
         _db.Organizations.Add(Entity);
         _db.SaveChanges();
     }
     catch (Exception)
     {
         throw new NotImplementedException();
     }
 }
Пример #5
0
 public UserFriendRepository()
 {
     _dbContext = new SocialAppEntities();
 }
Пример #6
0
 public CommentRepository()
 {
     _dbContext = new SocialAppEntities();
 }
 public PostRepository()
 {
     _dbContext = new SocialAppEntities();
 }
Пример #8
0
 public CountryRepository()
 {
     _context = new SocialAppEntities();
 }
 public StateRepository()
 {
     _context = new SocialAppEntities();
 }
Пример #10
0
 public UserProfileRepository()
 {
     _context = new SocialAppEntities();
 }
 public ConversationRepository()
 {
     _context = new SocialAppEntities();
 }
 public NotificationRepository()
 {
     _dbContext = new SocialAppEntities();
 }
 public UserMessageRepository()
 {
     _context = new SocialAppEntities();
 }