public static UserScope ToUserScope(this InsertOrUpdateUserScopeCommand command) { return(command.MapTo <InsertOrUpdateUserScopeCommand, UserScope>()); }
public async Task <int> InsertOrUpdate([FromBody] InsertOrUpdateUserScopeCommand command) { command.CreatedBy = User.Identity.GetUserName(); command.CreatedOn = DateTime.Now; return(await Mediator.Send(command)); }