public static BlogModuleModel BlogEntityMapper(ta_blog tentity) { var resultl = new BlogModuleModel { blogdate = tentity.blogdate, blogdescription = tentity.blogdescription, blogid = tentity.blogid, blogimage = tentity.blogimage, blogkeywords = tentity.blogkeywords, blogtags = tentity.blogtags, blogtitle = tentity.blogtitle, blogupdate = tentity.blogupdate, blogwebsite = tentity.blogwebsite, blogpublished = tentity.blogpublished, }; return(resultl); }
public long Create(BlogModuleModel tentity) { using (var scope = new TransactionScope()) { var NewRecord = new ta_blog { blogdate = tentity.blogdate, blogdescription = tentity.blogdescription, blogimage = tentity.blogimage, blogkeywords = tentity.blogkeywords, blogtags = tentity.blogtags, blogtitle = tentity.blogtitle, blogupdate = tentity.blogupdate, blogwebsite = tentity.blogwebsite, blogpublished = tentity.blogpublished, }; _unitOfWork.BlogsRepository.Insert(NewRecord); _unitOfWork.Save(); scope.Complete(); return(NewRecord.blogid); } }