public void SendEmail(IInsertMember insertMember) { TfEmail.Send( "MemberRegister", insertMember.Member.email, insertMember.Member.ToDictionary()); }
public void InsertMember(IInsertMember insertMember) { insertMember.Member.activation_key = KeyGenerator.GetUniqueKey(100); var members = _Schemas.Members; members.Entity.SetValuesFromModel(insertMember.Member, false); members.Insert(); }
public ValidationResult ValidateUsername(IInsertMember insertMember) { var members = _Schemas.Members; members.Entity.username = insertMember.Member.username; members.Entity.active = EnumActive.Active; if (members.Count > 0) { return(TfValidationResult.Compose( "InvalidDuplicate", new[] { insertMember.Member.username }, nameof(insertMember.Member.username))); } return(null); }
public Insert AddClause(IInsertMember clause) { switch (clause) { case IntoColumns ic: _intoColumns = ic; break; case IValues val: _valueClauses.Add(val); break; case Returning ret: _returningClause = ret; break; } return(this); }