public async Task <bool> CreateAdminAccount(Admin admin) { if (LoginExist(admin)) { return(false); } admin.Password = Eramake.eCryptography.Encrypt(admin.Password); await _repository.InsertEntityAsync(CollectionName, admin); return(true); }
public async Task <IActionResult> RegisterGuest([FromBody] Guest guestForRegister) { await _repository.InsertEntityAsync(CollectionName, guestForRegister); return(StatusCode(201)); }
public async Task <IActionResult> RegisterOffice([FromBody] Office officeForRegister) { await _repository.InsertEntityAsync(CollectionName, officeForRegister); return(StatusCode(201)); }
public async Task <IActionResult> RegisterDesk([FromBody] Desk deskForRegister) { await _repository.InsertEntityAsync(CollectionName, deskForRegister); return(StatusCode(201)); }
public async Task <IActionResult> RegisterPrinter([FromBody] Printer printerForRegistration) { await _repository.InsertEntityAsync(CollectionName, printerForRegistration); return(StatusCode(201)); }
public async Task <IActionResult> RegisterEmployee([FromBody] Employee employeeForRegister) { await _repository.InsertEntityAsync(CollectionName, employeeForRegister); return(StatusCode(201)); }
public async Task <IActionResult> RegisterKitchen([FromBody] Kitchen kitchenForRegistration) { await _repository.InsertEntityAsync(CollectionName, kitchenForRegistration); return(StatusCode(201)); }