public bool CreateInfo(InformationContract newIF) { Information i = new Information { idCate = newIF.idCate, idUser = newIF.idUser, titleInfo = newIF.titleInfo, contentInfo = newIF.contentInfo, hideInfo = newIF.hideInfo, newInfo = newIF.newInfo, token = newIF.token }; if (Repositories.CreateInfo(i) == true) { return(true); } return(false); }
public bool UpdateInfo(InformationContract i) { Information info = new Information(); info.titleInfo = i.titleInfo; info.idCate = i.idCate; info.contentInfo = i.contentInfo; info.idInfor = i.idInfor; if (Repositories.UpdateInfo(info) == true) { return(true); } return(false); }