public int Update(PostEntityCreate entity) { return(Execute("update posts set title = :title, preview = :preview, content = :content where id = :id", entity)); }
public int Create(PostEntityCreate entity) { return(Execute("insert into posts(id,title,preview,content,author,publish_date) values(:id,:title,:preview,:content,:author,:publish_date)", entity)); }