public async Task <IpNetworkModel> Create(IpNetworkModel model) { var entity = _repository.Create(model.ToEntity()); entity.IpNetwork = Parse(model); return(await Task.FromResult(entity.ToModel()).ConfigureAwait(false)); }
public static IpEntity ToEntity(this IpNetworkModel model) { if (model == null) { return(null); } return(new IpEntity { IpNetwork = model.IpNetwork }); }
public string Parse(IpNetworkModel model) { return(_parseService.ParseRange(model.IpNetwork)); }