public void Seeds() { foreach (var type in _types) { _typeRepository.Create(type); } }
public ValidationResult Handler(CreateTypeCommand command) { Type type = new Type(command.Definicion, command.Icon); Boolean result = _typeRepository.Create(type); return(Validate(type)); }
public async Task <Models.DTO.Type> Create( CreateType type, string tenantId, CancellationToken cancellationToken) { var newType = TypeMapper.MapToDomain( type, tenantId); await _typeRepository.Create( newType, cancellationToken); return(TypeMapper.MapToDto(newType)); }
public async Task <IActionResult> Post(SubscriptionType model) { try { model.CreatedDate = DateTime.UtcNow; await _typeRepository.Create(model); return(Ok(NotificationMessage.TypePostSuccess)); } catch (Exception ex) { _log.LogError(ex.ToString()); return(BadRequest(ex.ToString())); } }
public IActionResult Save([FromBody] Type type) { if (type is null) { return(BadRequest("Type is null.")); } if (!ModelState.IsValid) { return(BadRequest()); } if (type.TypeId == 0) { _repository.Create(type); return(new JsonResult(new { create = true, type })); } else { _repository.Update(type); return(new JsonResult(new { update = true, type })); } }
public EnterType Create(string description, int userId) { var type = new EnterType(description, userId); return(_typeRepository.Create(type)); }
public void Should_Create_Type_Return_true() { Boolean ret = _typeRepository.Create(TypeQueriesMock.typeCreated); Assert.IsTrue(ret); }
public Type Create(Type type) { return(typesRepository.Create(type)); }
public void Post([FromBody] string value) { _typeRepository.Create(value); }
public Type CreateType(Type ty) { return(_typeRepo.Create(ty)); }