示例#1
0
        public async override Task <IProcessorResult <IVendor> > Create()
        {
            var up    = new UserProcessor(Model);
            var users = await up.GetUserByUsername();

            if (users.Count > 0)
            {
                IProcessorResult <IVendor> result = new ProcessorResult <IVendor>("Username already exists.");
                return(result);
            }
            return(await base.Create());
        }
示例#2
0
        public async Task <IProcessorResult <Guid> > Login()
        {
            UserProcessor up = new UserProcessor(Model);

            return(await up.Login());
        }