예제 #1
0
        public static bool Insert(Application application)
        {
            using (var context = Context())
               {
               int id = context.Insert<Application>("Application", application)
                   .AutoMap(x => x.ApplicationId)
                   .ExecuteReturnLastId<int>();

               application.ApplicationId = id;
               return id > 0;
               }
        }
예제 #2
0
 public static bool Delete(Application application)
 {
     return Delete(application.ApplicationId);
 }
예제 #3
0
 public static bool Update(Application application)
 {
     using (var context = Context())
        {
        return context.Update<Application>("Application", application)
            .AutoMap(x => x.ApplicationId)
                                 .Where("ApplicationId", application.ApplicationId)
                                .Execute() > 0;
        }
 }