public static WX_FansService instance() { if (_instance == null) { _instance = new WX_FansService(); } return(_instance); }
public int Insert(WX_Fans entity) { int result = 0; entity.ID = Guid.NewGuid(); entity.CreateTime = DateTime.Now; if (WX_FansService.instance().GetEnumByCompanyIDAndOpenid(entity.ConpanyID, entity.OPENID) == null) { _db.Execute(() => { result = _db.Insert <WX_Fans>(entity); }); } return(result); }