Exemple #1
0
 public static bool Delete(Core.Models.UserFollower entity)
 {
     try
     {
         using (var ctx = new Data.AmstramgramContext())
         {
             var UserFollowerRepo = new Data.Repositories.UserFollowerRepository(ctx, null);
             UserFollowerRepo.Delete(entity);
             return(UserFollowerRepo.SaveChanges());
         }
     }
     catch
     {
         return(false);
     }
 }
Exemple #2
0
 public static Core.Models.UserFollower Add(Core.Models.UserFollower entity)
 {
     try
     {
         using (var ctx = new Data.AmstramgramContext())
         {
             var UserFollowerRepo = new Data.Repositories.UserFollowerRepository(ctx, null);
             var result           = UserFollowerRepo.Add(entity);
             if (!UserFollowerRepo.SaveChanges())
             {
                 return(null);
             }
             return(result);
         }
     }
     catch
     {
         return(null);
     }
 }